scripts: use ZAPRET_RW and ZAPRET_CONFIG vars

This commit is contained in:
bol-van
2024-08-25 17:49:15 +03:00
parent 243a64cbec
commit 983205e984
10 changed files with 118 additions and 36 deletions

View File

@@ -31,7 +31,9 @@ check_need_to_reload_tpws6()
else
ZAPRET_BASE=/opt/zapret
fi
. "$ZAPRET_BASE/config"
ZAPRET_RW=${ZAPRET_RW:-"$ZAPRET_BASE"}
ZAPRET_CONFIG=${ZAPRET_CONFIG:-"$ZAPRET_RW/config"}
. "$ZAPRET_CONFIG"
check_need_to_reload_tpws6
[ -n "$RELOAD_TPWS6" ] && {

View File

@@ -1,7 +1,9 @@
. /lib/functions/network.sh
[ -n "$ZAPRET_BASE" ] || ZAPRET_BASE=/opt/zapret
. "$ZAPRET_BASE/config"
ZAPRET_BASE=${ZAPRET_BASE:-/opt/zapret}
ZAPRET_RW=${ZAPRET_RW:-"$ZAPRET_BASE"}
ZAPRET_CONFIG=${ZAPRET_CONFIG:-"$ZAPRET_RW/config"}
. "$ZAPRET_CONFIG"
. "$ZAPRET_BASE/common/base.sh"
. "$ZAPRET_BASE/common/fwtype.sh"
. "$ZAPRET_BASE/common/queue.sh"