mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 20:20:53 +03:00
16 lines
328 B
Bash
16 lines
328 B
Bash
#!/bin/sh
|
|
|
|
ZAPRET=/etc/init.d/zapret
|
|
|
|
[ "$ACTION" = "ifup" ] && [ -x "$ZAPRET" ] && "$ZAPRET" enabled && {
|
|
[ -n "$ZAPRET_BASE" ] || ZAPRET_BASE=/opt/zapret
|
|
. "$ZAPRET_BASE/config"
|
|
[ -n "$OPENWRT_LAN" ] || OPENWRT_LAN=lan
|
|
for lan in $OPENWRT_LAN; do
|
|
[ "$INTERFACE" = "$lan" ] && {
|
|
"$ZAPRET" restart
|
|
break
|
|
}
|
|
done
|
|
}
|