mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-01 03:26:51 +00:00
ceb612e463
When hostapd gets restarted to often/quickly will cause procd to not restart it anymore. it will think that hapd is in a crash loop. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Felix Fietkau <nbd@nbd.name> [adjust respawn time]
26 lines
584 B
Bash
26 lines
584 B
Bash
#!/bin/sh /etc/rc.common
|
|
|
|
START=19
|
|
STOP=21
|
|
|
|
USE_PROCD=1
|
|
NAME=wpad
|
|
|
|
start_service() {
|
|
if [ -x "/usr/sbin/hostapd" ]; then
|
|
mkdir -p /var/run/hostapd
|
|
procd_open_instance hostapd
|
|
procd_set_param command /usr/sbin/hostapd -s -g /var/run/hostapd/global
|
|
procd_set_param respawn 3600 1 0
|
|
procd_close_instance
|
|
fi
|
|
|
|
if [ -x "/usr/sbin/wpa_supplicant" ]; then
|
|
mkdir -p /var/run/wpa_supplicant
|
|
procd_open_instance supplicant
|
|
procd_set_param command /usr/sbin/wpa_supplicant -n -s -g /var/run/wpa_supplicant/global
|
|
procd_set_param respawn 3600 1 0
|
|
procd_close_instance
|
|
fi
|
|
}
|