zapret/init.d/openwrt/90-zapret

16 lines
328 B
Plaintext
Raw Normal View History

2021-03-04 11:30:38 +00:00
#!/bin/sh
ZAPRET=/etc/init.d/zapret
[ "$ACTION" = "ifup" ] && [ -x "$ZAPRET" ] && "$ZAPRET" enabled && {
[ -n "$ZAPRET_BASE" ] || ZAPRET_BASE=/opt/zapret
. "$ZAPRET_BASE/config"
2021-09-29 11:18:36 +00:00
[ -n "$OPENWRT_LAN" ] || OPENWRT_LAN=lan
for lan in $OPENWRT_LAN; do
[ "$INTERFACE" = "$lan" ] && {
"$ZAPRET" restart
break
}
done
2021-03-04 11:30:38 +00:00
}