mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-18 22:43:00 +08:00
25 lines
443 B
Bash
Executable File
25 lines
443 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
START=95
|
|
STOP=5
|
|
USE_PROCD=1
|
|
|
|
PROG=/usr/sbin/mwan3-autobalancer
|
|
|
|
start_service() {
|
|
config_load mwan3_autobalancer
|
|
config_get_bool enabled main enabled 0
|
|
[ "$enabled" -eq 1 ] || return 0
|
|
|
|
procd_open_instance
|
|
procd_set_param command "$PROG" run
|
|
procd_set_param respawn
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_close_instance
|
|
}
|
|
|
|
service_triggers() {
|
|
procd_add_reload_trigger mwan3_autobalancer
|
|
}
|