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