init: MODE_OVERRIDE to allow code reuse from custom scripts

This commit is contained in:
bol-van
2022-01-01 10:42:38 +03:00
parent 83e3f21ced
commit 566e3d1536
4 changed files with 6 additions and 6 deletions

View File

@@ -457,7 +457,7 @@ zapret_apply_firewall()
# always create ipsets. ip_exclude ipset is required
create_ipset no-update
case "${MODE}" in
case "${MODE_OVERRIDE:-$MODE}" in
tpws)
if [ ! "$MODE_HTTP" = "1" ] && [ ! "$MODE_HTTPS" = "1" ]; then
echo both http and https are disabled. not applying redirection.

View File

@@ -107,7 +107,7 @@ tpws_apply_socks_binds()
start_service() {
local opt qn qns qn6 qns6
case "${MODE}" in
case "${MODE_OVERRIDE:-$MODE}" in
tpws)
opt="--port=$TPPORT $TPWS_OPT"
filter_apply_hostlist_target opt