net/mosquitto: add respawn
authorKarl Palsson <redacted>
Tue, 22 Jun 2021 09:27:24 +0000 (09:27 +0000)
committerKarl Palsson <redacted>
Tue, 22 Jun 2021 09:27:24 +0000 (09:27 +0000)
As a daemon service, respawn is expected by default, and we have that
facility available via procd.

Suggested-in: https://github.com/openwrt/packages/pull/15272
Signed-off-by: Karl Palsson <redacted>
net/mosquitto/files/etc/init.d/mosquitto

index 603b988eb9e98c5c1c6fa8d451ae65767fc3faef..082c01dede2b6a27aa8b205b4952f5171bbe03f1 100755 (executable)
@@ -243,6 +243,7 @@ start_service_real() {
        # Makes /etc/init.d/mosquitto reload work if you edit the final file.
        procd_set_param file $CONF_WATCH
        [ "$write_pid" -eq 1 ] && procd_set_param pidfile /var/run/mosquitto.pid
+       procd_set_param respawn
        procd_close_instance
 }
 
git clone https://git.99rst.org/PROJECT