This enables the procd handling for mwan3 on config change. Signed-off-by: Florian Eckert <fe@dev.tdt.de>lilik-openwrt-22.03
@ -1,20 +1,28 @@ | |||||
#!/bin/sh /etc/rc.common | #!/bin/sh /etc/rc.common | ||||
START=19 | START=19 | ||||
reload() { | |||||
/usr/sbin/mwan3 restart | |||||
} | |||||
USE_PROCD=1 | |||||
boot() { | boot() { | ||||
. /lib/config/uci.sh | . /lib/config/uci.sh | ||||
uci_toggle_state mwan3 globals enabled "1" | uci_toggle_state mwan3 globals enabled "1" | ||||
mwan3_boot=1 | |||||
rc_procd start_service | |||||
} | |||||
reload_service() { | |||||
/usr/sbin/mwan3 restart | |||||
} | } | ||||
start() { | |||||
start_service() { | |||||
[ -n "${mwan3_boot}" ] && return 0 | |||||
/usr/sbin/mwan3 start | /usr/sbin/mwan3 start | ||||
} | } | ||||
stop() { | |||||
stop_service() { | |||||
/usr/sbin/mwan3 stop | /usr/sbin/mwan3 stop | ||||
} | } | ||||
service_triggers() { | |||||
procd_add_reload_trigger 'mwan3' | |||||
} |