mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 20:20:53 +03:00
init.d: openwrt hotplug script use link target of /etc/init.d/zapret
This commit is contained in:
parent
ef18b85b42
commit
98f43819f6
@ -3,7 +3,13 @@
|
||||
ZAPRET=/etc/init.d/zapret
|
||||
|
||||
[ "$ACTION" = "ifup" ] && [ -x "$ZAPRET" ] && "$ZAPRET" enabled && {
|
||||
[ -n "$ZAPRET_BASE" ] || ZAPRET_BASE=/opt/zapret
|
||||
SCRIPT=$(readlink "$ZAPRET")
|
||||
if [ -n "$SCRIPT" ]; then
|
||||
EXEDIR=$(dirname "$SCRIPT")
|
||||
ZAPRET_BASE=$(readlink -f "$EXEDIR/../..")
|
||||
else
|
||||
ZAPRET_BASE=/opt/zapret
|
||||
fi
|
||||
. "$ZAPRET_BASE/config"
|
||||
[ -n "$OPENWRT_LAN" ] || OPENWRT_LAN=lan
|
||||
for lan in $OPENWRT_LAN; do
|
||||
|
Loading…
Reference in New Issue
Block a user