Add many new scripts for manage service

This commit is contained in:
remittor
2024-11-15 21:55:02 +03:00
parent b0953bbaaf
commit 2b178173de
12 changed files with 348 additions and 209 deletions

16
zapret/renew-cfg.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
# Copyright (c) 2024 remittor
. /opt/zapret/comfunc.sh
merge_cfg_with_def_values
CONFIGS_SYNC=0
[ ! -f "$ZAPRET_CONFIG" ] && CONFIGS_SYNC=1
[ "$1" = "sync" ] && CONFIGS_SYNC=1
if [ "$CONFIGS_SYNC" = "1" ]; then
# renew main config
/opt/zapret/sync_config.sh
fi