1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-14 19:33:59 +02:00
openwrt-packages/net/mwan3/files/etc/hotplug.d/iface/16-mwan3-user
Brian J. Murrell 3d824ea288 mwan3: Use shebang in /etc/mwan3.user
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>
2021-09-03 11:46:28 +02:00

26 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