From 00490e3b5d97dfd011277e3ab1998f5de88c7b2a Mon Sep 17 00:00:00 2001 From: remittor Date: Tue, 13 Jan 2026 14:17:07 +0300 Subject: [PATCH] shell: Fix sh-scripts (copilot) --- zapret2/comfunc.sh | 2 +- zapret2/def-cfg.sh | 6 +++--- zapret2/sync_config.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/zapret2/comfunc.sh b/zapret2/comfunc.sh index 869758e..73d71b4 100755 --- a/zapret2/comfunc.sh +++ b/zapret2/comfunc.sh @@ -130,7 +130,7 @@ function restore_all_ipset_cfg restore_ipset_txt zapret-hosts-google.txt restore_ipset_txt zapret-hosts-user.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 diff --git a/zapret2/def-cfg.sh b/zapret2/def-cfg.sh index 59a8d61..0fb7c7a 100755 --- a/zapret2/def-cfg.sh +++ b/zapret2/def-cfg.sh @@ -4,7 +4,7 @@ function set_cfg_reset_values { local cfgname=${1:-$ZAPRET_CFG_NAME} - local TAB="$( echo -n -e '\t' )" + local TAB="$( printf '\t' )" uci batch <<-EOF set $cfgname.config.run_on_boot='0' # settings for zapret service @@ -52,7 +52,7 @@ function set_cfg_reset_values function clear_nfqws_strat { local cfgname=${1:-$ZAPRET_CFG_NAME} - local TAB="$( echo -n -e '\t' )" + local TAB="$( printf '\t' )" uci batch <<-EOF set $cfgname.config.MODE_FILTER='hostlist' set $cfgname.config.NFQWS2_PORTS_TCP='80,443' @@ -66,7 +66,7 @@ function set_cfg_nfqws_strat { local strat=${1:--} local cfgname=${2:-$ZAPRET_CFG_NAME} - local TAB="$( echo -n -e '\t' )" + local TAB="$( printf '\t' )" uci batch <<-EOF set $cfgname.config.MODE_FILTER='hostlist' diff --git a/zapret2/sync_config.sh b/zapret2/sync_config.sh index b9dd023..2fa37f5 100755 --- a/zapret2/sync_config.sh +++ b/zapret2/sync_config.sh @@ -46,7 +46,7 @@ function sync_param local value="$( uci -q get $ZAPRET_CFG_SEC.$param )" uncomment_param $param append_param $param - local TAB="$( echo -n -e '\t' )" + local TAB="$( printf '\t' )" if [ "$value" = "$TAB" ]; then value="" fi