1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 19:41:51 +00:00

Fix uci omr-bypass

This commit is contained in:
Ycarus 2018-11-20 21:18:06 +01:00
parent 65adb4ec9e
commit b0894b2d46

18
luci-app-omr-bypass/root/etc/uci-defaults/41_omr-bypass Normal file → Executable file
View file

@ -54,15 +54,15 @@ if [ "$(uci -q get ucitrack.@shadowsocks-libev[-1].affects | grep omr-bypass)" !
del_list ucitrack.@shadowsocks-libev[-1].affects=omr-bypass
EOF
fi
s=firewall.omr-bypass
uci get "$s" >/dev/null || {
uci batch <<-EOF
set $s=include
set $s.path=/etc/firewall.omr-bypass
set $s.reload=1
commit firewall
EOF
}
if [ "$(uci -q get firewall.omr-bypass)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set firewall.omr-bypass=include
set firewall.omr-bypass.path=/etc/firewall.omr-bypass
set firewall.omr-bypass.reload=1
commit firewall
EOF
fi
rm -f /tmp/luci-indexcache
exit 0