From 51fc9739d811f94b01c7b9a1bb6b629129268f95 Mon Sep 17 00:00:00 2001 From: remittor Date: Wed, 20 Nov 2024 22:08:40 +0300 Subject: [PATCH] config: Skip run_on_boot option on restore default uci-config --- zapret/restore-def-cfg.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zapret/restore-def-cfg.sh b/zapret/restore-def-cfg.sh index 53f30c9..09c74c5 100755 --- a/zapret/restore-def-cfg.sh +++ b/zapret/restore-def-cfg.sh @@ -3,8 +3,15 @@ . /opt/zapret/comfunc.sh +cfg_run_on_boot="$( uci -q get zapret.config.run_on_boot )" + create_default_cfg +if [ "$cfg_run_on_boot" = "1" ]; then + uci set zapret.config.run_on_boot=1 + uci commit +fi + if [ "$1" = "sync" ]; then # renew main config /opt/zapret/sync_config.sh