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:
parent
f89c9e89f5
commit
a6dc75428c
1 changed files with 14 additions and 6 deletions
|
@ -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'
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue