hostapd: pass respawn settings when registering the service
authorJohn Crispin <john@phrozen.org>
Fri, 11 Dec 2020 07:07:40 +0000 (08:07 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 22 Dec 2020 18:30:26 +0000 (19:30 +0100)
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]
package/network/services/hostapd/files/wpad.init

index 3198e9801f0df3dd43d1b8591f30cf8ce2664380..84717967747018f9becf6d11560349ec2949f070 100644 (file)
@@ -11,7 +11,7 @@ start_service() {
                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
+               procd_set_param respawn 3600 1 0
                procd_close_instance
        fi
 
@@ -19,7 +19,7 @@ start_service() {
                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
+               procd_set_param respawn 3600 1 0
                procd_close_instance
        fi
 }