1
0
Fork 0

Some log information and error treatment

This commit is contained in:
Joao M 2022-08-20 15:50:11 +00:00
parent 9ba269845d
commit 4b85b98412
9 changed files with 69 additions and 1 deletions

View file

@ -4,6 +4,11 @@ cd /scripts
RELOAD="true"
if [[ "static|docker|swarm" != *"$EASYHAPROXY_DISCOVER"* ]];then
echo "[CONF_CHECK] $(date +"$EASYHAPROXY_DATEFORMAT") ERROR: EASYHAPROXY_DISCOVER should be 'static', 'docker', or 'swarm'. I got '$EASYHAPROXY_DISCOVER' instead."
exit 1
fi
if [[ "$EASYHAPROXY_DISCOVER" == "static" ]]; then
CONTROL_FILE="/etc/haproxy/haproxy.cfg"
touch ${CONTROL_FILE}