From 63a4496e5fb0cd988943b5eb0b6a42eca447e49f Mon Sep 17 00:00:00 2001 From: gyurix Date: Wed, 29 Sep 2021 19:02:47 +0000 Subject: [PATCH] New settings of domain check. --- scripts/check_proxy_state.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/check_proxy_state.sh b/scripts/check_proxy_state.sh index 697874f..d9e0664 100755 --- a/scripts/check_proxy_state.sh +++ b/scripts/check_proxy_state.sh @@ -47,10 +47,10 @@ do_proxy_restart() { done fi done - check_domain; + # in case of new proxy configuration generated needed to copy the domain name to the configs file.then remove new_config flag. if [[ -f $PROXY_CONFIG_DIR/new_config ]] ; then - if [[ ! -f $PROXY_CONFIG_DIR/config || "$(grep $DOMAIN $PROXY_CONFIG_DIR/config)" == "" ]] ; then + if [[ ! -f $PROXY_CONFIG_DIR/config || "$(grep $DOMAIN $PROXY_CONFIG_DIR/config 2>/dev/null)" == "" ]] ; then cat $PROXY_CONFIG_DIR/new_config >> $PROXY_CONFIG_DIR/config; fi @@ -159,6 +159,8 @@ fi # call method check_proxy_state +# At last check the previously settings of domain. +check_domain # sleep $TIMEOUT; # RESTART_COUNTER=$((RESTART_COUNTER +1))