To allow the script to define what it should be run with. This let's the user use bash if it's available, or python, or perl, etc. Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca> Update PKG_VERSION to 2.10.11 Signed-off-by: Florian Eckert <fe@dev.tdt.de>
25 lines
464 B
Bash
25 lines
464 B
Bash
#!/bin/sh
|
|
|
|
[ -f "/etc/mwan3.user" ] && {
|
|
. /lib/functions.sh
|
|
. /lib/mwan3/mwan3.sh
|
|
initscript=/etc/init.d/mwan3
|
|
. /lib/functions/procd.sh
|
|
|
|
[ "$MWAN3_SHUTDOWN" != 1 ] && procd_lock
|
|
|
|
[ "$MWAN3_SHUTDOWN" != 1 ] && ! /etc/init.d/mwan3 running && {
|
|
exit 0
|
|
}
|
|
|
|
config_load mwan3
|
|
|
|
config_get_bool enabled "$INTERFACE" enabled 0
|
|
[ "${enabled}" -eq 1 ] || {
|
|
exit 0
|
|
}
|
|
|
|
env -i ACTION="$ACTION" INTERFACE="$INTERFACE" DEVICE="$DEVICE" /etc/mwan3.user
|
|
}
|
|
|
|
exit 0
|