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

@ -0,0 +1,5 @@
_
___ __ _ ____ _ ___| |_ __ _ _ __ _ _ _____ ___ _
/ -_) _` (_-< || |___| ' \/ _` | '_ \ '_/ _ \ \ / || |
\___\__,_/__/\_, | |_||_\__,_| .__/_| \___/_\_\\_, |
|__/ |_| |__/

View file

@ -1,5 +1,9 @@
#!/usr/bin/env bash
if [ ! -f /scripts/letsencrypt_hosts.txt ]; then
exit 0
fi
# Semaphore
if [ -f /tmp/certbot-lock ]; then
echo "[CERTBOT_JOB] $(date +"$EASYHAPROXY_DATEFORMAT") Another process is running"

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}

View file

@ -10,6 +10,14 @@ if [ -z "$EASYHAPROXY_REFRESH_CONF" ]; then
export EASYHAPROXY_REFRESH_CONF=10
fi
cat banner.txt
echo Release: $RELEASE_VERSION
echo
echo "Environment"
env | sort | grep 'HAPROXY' | xargs -I{} echo " - {} "
echo
/scripts/haproxy-reload.sh initial
while true; do