mirror of
https://github.com/bol-van/zapret.git
synced 2025-01-07 17:00:34 +05: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
|
#!/bin/sh
|
||||||
|
|
||||||
ZAPRET=/etc/init.d/zapret
|
ZAPRET=/etc/init.d/zapret
|
||||||
[ -x "$ZAPRET" ] && [ "$INTERFACE" = "lan" ] && {
|
|
||||||
[ "$ACTION" = "ifup" ] && {
|
[ "$ACTION" = "ifup" ] && [ -x "$ZAPRET" ] && "$ZAPRET" enabled && {
|
||||||
$ZAPRET enabled && $ZAPRET restart
|
[ -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