Browse Source

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>
lilik-openwrt-22.03
Florian Eckert 5 years ago
parent
commit
a6dc75428c
1 changed files with 14 additions and 6 deletions
  1. +14
    -6
      net/mwan3/files/etc/init.d/mwan3

+ 14
- 6
net/mwan3/files/etc/init.d/mwan3 View File

@ -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'
}

Loading…
Cancel
Save