mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2026-01-27 04:40:34 +03:00
shell: Fix sh-scripts (copilot)
This commit is contained in:
@@ -130,7 +130,7 @@ function restore_all_ipset_cfg
|
|||||||
restore_ipset_txt zapret-hosts-google.txt
|
restore_ipset_txt zapret-hosts-google.txt
|
||||||
restore_ipset_txt zapret-hosts-user.txt
|
restore_ipset_txt zapret-hosts-user.txt
|
||||||
restore_ipset_txt zapret-hosts-user-exclude.txt
|
restore_ipset_txt zapret-hosts-user-exclude.txt
|
||||||
restore_ipset_txt zapret-ip-exclude.txt.txt
|
restore_ipset_txt zapret-ip-exclude.txt
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_default_cfg
|
function create_default_cfg
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
function set_cfg_reset_values
|
function set_cfg_reset_values
|
||||||
{
|
{
|
||||||
local cfgname=${1:-$ZAPRET_CFG_NAME}
|
local cfgname=${1:-$ZAPRET_CFG_NAME}
|
||||||
local TAB="$( echo -n -e '\t' )"
|
local TAB="$( printf '\t' )"
|
||||||
uci batch <<-EOF
|
uci batch <<-EOF
|
||||||
set $cfgname.config.run_on_boot='0'
|
set $cfgname.config.run_on_boot='0'
|
||||||
# settings for zapret service
|
# settings for zapret service
|
||||||
@@ -52,7 +52,7 @@ function set_cfg_reset_values
|
|||||||
function clear_nfqws_strat
|
function clear_nfqws_strat
|
||||||
{
|
{
|
||||||
local cfgname=${1:-$ZAPRET_CFG_NAME}
|
local cfgname=${1:-$ZAPRET_CFG_NAME}
|
||||||
local TAB="$( echo -n -e '\t' )"
|
local TAB="$( printf '\t' )"
|
||||||
uci batch <<-EOF
|
uci batch <<-EOF
|
||||||
set $cfgname.config.MODE_FILTER='hostlist'
|
set $cfgname.config.MODE_FILTER='hostlist'
|
||||||
set $cfgname.config.NFQWS2_PORTS_TCP='80,443'
|
set $cfgname.config.NFQWS2_PORTS_TCP='80,443'
|
||||||
@@ -66,7 +66,7 @@ function set_cfg_nfqws_strat
|
|||||||
{
|
{
|
||||||
local strat=${1:--}
|
local strat=${1:--}
|
||||||
local cfgname=${2:-$ZAPRET_CFG_NAME}
|
local cfgname=${2:-$ZAPRET_CFG_NAME}
|
||||||
local TAB="$( echo -n -e '\t' )"
|
local TAB="$( printf '\t' )"
|
||||||
|
|
||||||
uci batch <<-EOF
|
uci batch <<-EOF
|
||||||
set $cfgname.config.MODE_FILTER='hostlist'
|
set $cfgname.config.MODE_FILTER='hostlist'
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ function sync_param
|
|||||||
local value="$( uci -q get $ZAPRET_CFG_SEC.$param )"
|
local value="$( uci -q get $ZAPRET_CFG_SEC.$param )"
|
||||||
uncomment_param $param
|
uncomment_param $param
|
||||||
append_param $param
|
append_param $param
|
||||||
local TAB="$( echo -n -e '\t' )"
|
local TAB="$( printf '\t' )"
|
||||||
if [ "$value" = "$TAB" ]; then
|
if [ "$value" = "$TAB" ]; then
|
||||||
value=""
|
value=""
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user