mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
mwan3: switch to procd init script
This enables the procd handling for mwan3 on config change. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
@@ -1,20 +1,28 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
START=19
|
START=19
|
||||||
|
USE_PROCD=1
|
||||||
reload() {
|
|
||||||
/usr/sbin/mwan3 restart
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
reload_service() {
|
||||||
|
/usr/sbin/mwan3 restart
|
||||||
|
}
|
||||||
|
|
||||||
|
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'
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user