From b410ef2e359488bd66712cf3be8b69181ec9b5d2 Mon Sep 17 00:00:00 2001 From: bolvan Date: Mon, 6 May 2019 12:36:16 +0300 Subject: [PATCH] remove firewall.user code in init --- init.d/openwrt/zapret | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/init.d/openwrt/zapret b/init.d/openwrt/zapret index 1b0ab74..b0d12ab 100755 --- a/init.d/openwrt/zapret +++ b/init.d/openwrt/zapret @@ -62,25 +62,6 @@ TPWS_OPT_BASE_HTTP="--port=$TPPORT_HTTP $TPWS_OPT_BASE" TPWS_OPT_BASE_HTTPS="--port=$TPPORT_HTTPS $TPWS_OPT_BASE" -# must execute /etc/firewall.user on every firewall reload -set_firewall_user_reload() { - i=0 - while true - do - path=$(uci -q get firewall.@include[$i].path) - [ -n "$path" ] || break - [ "$path" == "/etc/firewall.user" ] && { - reload=$(uci -q get firewall.@include[$i].reload) - [ "$reload" = "1" ] || { - echo Setting 'reload' call option to /etc/firewall.user - uci set firewall.@include[$i].reload=1 - uci commit firewall - } - } - i=$((i+1)) - done -} - run_daemon() { # $1 - daemon string id or number. can use 1,2,3,... @@ -103,8 +84,6 @@ create_ipset() start_service() { - set_firewall_user_reload - case "${MODE}" in tpws_hostlist) run_daemon 1 $TPWS "$TPWS_OPT_BASE_HTTP $TPWS_OPT_HTTP --hostlist=$TPWS_HOSTLIST"