Correcting domain name variable in check_proxy_state method
This commit is contained in:
@@ -13,6 +13,7 @@ ROLE=$ROLE
|
|||||||
SERVICE_NAME=$SERVICE_NAME
|
SERVICE_NAME=$SERVICE_NAME
|
||||||
PROXY_CONFIG_DIR=$PROXY_CONFIG_DIR
|
PROXY_CONFIG_DIR=$PROXY_CONFIG_DIR
|
||||||
|
|
||||||
|
|
||||||
# Setup docker registry url path
|
# Setup docker registry url path
|
||||||
|
|
||||||
if [[ -n "$DOCKER_REGISTRY_URL" && "$DOCKER_REGISTRY_URL" != "null" ]] ; then
|
if [[ -n "$DOCKER_REGISTRY_URL" && "$DOCKER_REGISTRY_URL" != "null" ]] ; then
|
||||||
@@ -168,6 +169,7 @@ fi
|
|||||||
# call method
|
# call method
|
||||||
check_proxy_state
|
check_proxy_state
|
||||||
|
|
||||||
|
echo "PROXY RESTARTED SUCCESSFULY"
|
||||||
# in case of new proxy configuration generated needed to copy the domain name to the configs file.then remove new_config flag.
|
# 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/new_config ]] ; then
|
||||||
if [[ ! -f $PROXY_CONFIG_DIR/config || "$(grep $DOMAIN $PROXY_CONFIG_DIR/config 2>/dev/null)" == "" ]] ; then
|
if [[ ! -f $PROXY_CONFIG_DIR/config || "$(grep $DOMAIN $PROXY_CONFIG_DIR/config 2>/dev/null)" == "" ]] ; then
|
||||||
|
@@ -25,7 +25,6 @@ ALLOWED_NETWORK=$(jq -r '.ALLOWED_NETWORK | select(.!="null") | join(" ")' $DOMA
|
|||||||
ALTERNATE_LOCATION_PATH=$(jq -r .ALTERNATE_LOCATION_PATH $DOMAIN_SOURCE)
|
ALTERNATE_LOCATION_PATH=$(jq -r .ALTERNATE_LOCATION_PATH $DOMAIN_SOURCE)
|
||||||
# check whether certificates exist or not
|
# check whether certificates exist or not
|
||||||
|
|
||||||
|
|
||||||
if [[ "$HTTPS_PORT" != "" ]]; then
|
if [[ "$HTTPS_PORT" != "" ]]; then
|
||||||
/scripts/check_certificates.sh "$DOMAIN";
|
/scripts/check_certificates.sh "$DOMAIN";
|
||||||
fi
|
fi
|
||||||
|
@@ -31,6 +31,7 @@ do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ "${parent}" == "${DOMAIN_DIR}" && "${op}" == "CLOSE_WRITE,CLOSE" ]]; then
|
elif [[ "${parent}" == "${DOMAIN_DIR}" && "${op}" == "CLOSE_WRITE,CLOSE" ]]; then
|
||||||
|
|
||||||
DOMAIN=$(echo $file);
|
DOMAIN=$(echo $file);
|
||||||
|
|
||||||
if [[ "${PROXY_TYPE}" == "haproxy" ]]; then
|
if [[ "${PROXY_TYPE}" == "haproxy" ]]; then
|
||||||
@@ -42,9 +43,13 @@ do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ "${parent}" == "${PROXY_CONFIG_DIR}" && "${op}" == "CLOSE_WRITE,CLOSE" ]]; then
|
elif [[ "${parent}" == "${PROXY_CONFIG_DIR}" && "${op}" == "CLOSE_WRITE,CLOSE" ]]; then
|
||||||
|
|
||||||
|
if [[ $file != "new_config" && $file != "config" ]]; then
|
||||||
|
DOMAIN=$(echo "${file%.*}");
|
||||||
if [ -f "$PROXY_CONFIG_DIR/new_config" ] ; then
|
if [ -f "$PROXY_CONFIG_DIR/new_config" ] ; then
|
||||||
/scripts/check_proxy_state.sh "$DOMAIN";
|
/scripts/check_proxy_state.sh "$DOMAIN";
|
||||||
fi
|
fi
|
||||||
|
fi;
|
||||||
|
|
||||||
elif [[ "${parent}" == "${DOMAIN_DIR}" && "${op}" == "DELETE" ]] ; then
|
elif [[ "${parent}" == "${DOMAIN_DIR}" && "${op}" == "DELETE" ]] ; then
|
||||||
DOMAIN=$(echo $file);
|
DOMAIN=$(echo $file);
|
||||||
|
Reference in New Issue
Block a user