diff --git a/init.d/openwrt/custom.d.examples/10-inherit-nfqws b/init.d/openwrt/custom.d.examples/10-inherit-nfqws index b156402..83db175 100644 --- a/init.d/openwrt/custom.d.examples/10-inherit-nfqws +++ b/init.d/openwrt/custom.d.examples/10-inherit-nfqws @@ -6,17 +6,20 @@ zapret_custom_daemons() { # stop logic is managed by procd - MODE_OVERRIDE=$OVERRIDE start_daemons_procd + local MODE_OVERRIDE=$OVERRIDE + start_daemons_procd } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/openwrt/custom.d.examples/10-inherit-tpws b/init.d/openwrt/custom.d.examples/10-inherit-tpws index e9c5f69..157eab4 100644 --- a/init.d/openwrt/custom.d.examples/10-inherit-tpws +++ b/init.d/openwrt/custom.d.examples/10-inherit-tpws @@ -6,17 +6,20 @@ zapret_custom_daemons() { # stop logic is managed by procd - MODE_OVERRIDE=$OVERRIDE start_daemons_procd + local MODE_OVERRIDE=$OVERRIDE + start_daemons_procd } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/openwrt/custom.d.examples/10-inherit-tpws-socks b/init.d/openwrt/custom.d.examples/10-inherit-tpws-socks index b4e686a..90c97e9 100644 --- a/init.d/openwrt/custom.d.examples/10-inherit-tpws-socks +++ b/init.d/openwrt/custom.d.examples/10-inherit-tpws-socks @@ -6,17 +6,20 @@ zapret_custom_daemons() { # stop logic is managed by procd - MODE_OVERRIDE=$OVERRIDE start_daemons_procd + local MODE_OVERRIDE=$OVERRIDE + start_daemons_procd } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/openwrt/custom.d.examples/10-inherit-tpws4http-nfqws4https b/init.d/openwrt/custom.d.examples/10-inherit-tpws4http-nfqws4https index 752b1a2..c3685a5 100644 --- a/init.d/openwrt/custom.d.examples/10-inherit-tpws4http-nfqws4https +++ b/init.d/openwrt/custom.d.examples/10-inherit-tpws4http-nfqws4https @@ -5,7 +5,7 @@ nfqws_tpws_inheritor() { # $1 - inherited function # $2 - 1 - run, 0 - stop - + local MODE_OVERRIDE [ "$MODE_HTTP" = "1" ] && { MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2 } diff --git a/init.d/sysv/custom.d.examples/10-inherit-nfqws b/init.d/sysv/custom.d.examples/10-inherit-nfqws index 6002969..2e2dca0 100644 --- a/init.d/sysv/custom.d.examples/10-inherit-nfqws +++ b/init.d/sysv/custom.d.examples/10-inherit-nfqws @@ -6,17 +6,20 @@ zapret_custom_daemons() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_daemons $1 } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/sysv/custom.d.examples/10-inherit-tpws b/init.d/sysv/custom.d.examples/10-inherit-tpws index c1b183e..84ac85f 100644 --- a/init.d/sysv/custom.d.examples/10-inherit-tpws +++ b/init.d/sysv/custom.d.examples/10-inherit-tpws @@ -6,17 +6,20 @@ zapret_custom_daemons() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_daemons $1 } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/sysv/custom.d.examples/10-inherit-tpws-socks b/init.d/sysv/custom.d.examples/10-inherit-tpws-socks index 7fcb0e2..62ddb0a 100644 --- a/init.d/sysv/custom.d.examples/10-inherit-tpws-socks +++ b/init.d/sysv/custom.d.examples/10-inherit-tpws-socks @@ -6,17 +6,20 @@ zapret_custom_daemons() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_daemons $1 } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/sysv/custom.d.examples/10-inherit-tpws4http-nfqws4https b/init.d/sysv/custom.d.examples/10-inherit-tpws4http-nfqws4https index f05d75e..40eb419 100644 --- a/init.d/sysv/custom.d.examples/10-inherit-tpws4http-nfqws4https +++ b/init.d/sysv/custom.d.examples/10-inherit-tpws4http-nfqws4https @@ -5,7 +5,7 @@ nfqws_tpws_inheritor() { # $1 - inherited function # $2 - 1 - run, 0 - stop - + local MODE_OVERRIDE [ "$MODE_HTTP" = "1" ] && { MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2 }