Added proxy type variable.

This commit is contained in:
2021-09-23 16:04:53 +02:00
parent 97260b0080
commit c3c547b82f
2 changed files with 14 additions and 10 deletions

View File

@@ -148,6 +148,13 @@ elif [[ "$RUNNING_CONTAINERS" -eq 1 ]] ; then
fi fi
fi fi
done done
fi
} # end of check_proxy_state
# call method
check_proxy_state
# sleep $TIMEOUT; # sleep $TIMEOUT;
@@ -165,13 +172,3 @@ elif [[ "$RUNNING_CONTAINERS" -eq 1 ]] ; then
# done; # done;
fi
} # end of check_proxy_state
# call method
check_proxy_state

View File

@@ -5,6 +5,7 @@
DATE=`date +%F-%H-%M-%S` DATE=`date +%F-%H-%M-%S`
# Set env variables # Set env variables
PROXY_TYPE=$PROXY_TYPE
DOMAIN_DIR=$DOMAIN_DIR DOMAIN_DIR=$DOMAIN_DIR
CERT_DIR=$CERT_DIR CERT_DIR=$CERT_DIR
PROXY_CONFIG_DIR=$PROXY_CONFIG_DIR PROXY_CONFIG_DIR=$PROXY_CONFIG_DIR
@@ -37,6 +38,12 @@ do
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
echo "haproxy config created, changed";
/scripts/config_haproxy_generate.sh;
fi
echo "domain config created, changed"; echo "domain config created, changed";
/scripts/nginx_config_create.sh "$DOMAIN"; /scripts/nginx_config_create.sh "$DOMAIN";