mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-30 05:50:53 +03:00
openwrt init: change hotplug script to use OPENWRT_LAN
This commit is contained in:
parent
19c70ae9ea
commit
0a1c81b94d
@ -1,8 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
ZAPRET=/etc/init.d/zapret
|
||||
[ -x "$ZAPRET" ] && [ "$INTERFACE" = "lan" ] && {
|
||||
[ "$ACTION" = "ifup" ] && {
|
||||
$ZAPRET enabled && $ZAPRET restart
|
||||
}
|
||||
|
||||
[ "$ACTION" = "ifup" ] && [ -x "$ZAPRET" ] && "$ZAPRET" enabled && {
|
||||
[ -n "$ZAPRET_BASE" ] || ZAPRET_BASE=/opt/zapret
|
||||
. "$ZAPRET_BASE/config"
|
||||
for lan in $OPENWRT_LAN; do
|
||||
[ "$INTERFACE" = "$lan" ] && {
|
||||
"$ZAPRET" restart
|
||||
break
|
||||
}
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user