Increase restart attempts in proxy configuration and add domain check logging in certificate script
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
"PROXY_CONFIG_DIR": "/proxy_config",
|
||||
"PROXY_TYPE": "haproxy",
|
||||
"TIMEOUT": "5",
|
||||
"RESTART": "3",
|
||||
"RESTART": "10",
|
||||
"ROLE": "backend-proxy",
|
||||
"SERVICE_NAME": "public-proxy"
|
||||
},
|
||||
|
@@ -187,6 +187,7 @@ if [ "$GENERATE_CERTIFICATE" == "true" ] && [ "$DOMAIN" != "localhost" ]; then
|
||||
fi
|
||||
DOMAIN_CHECK="curl -s -o /dev/null -w "%{http_code}" http://$DOMAIN"
|
||||
if [[ "$(eval $DOMAIN_CHECK)" == "200" || "$(eval $DOMAIN_CHECK)" == "301" ]]; then
|
||||
echo "DOMAIN CHECK: $DOMAIN_CHECK"
|
||||
letsencrypt_certificates
|
||||
echo "Started letsencrypt for domain: $DOMAIN first time"
|
||||
else
|
||||
@@ -196,6 +197,7 @@ if [ "$GENERATE_CERTIFICATE" == "true" ] && [ "$DOMAIN" != "localhost" ]; then
|
||||
sleep $TIMEOUT
|
||||
echo "Starting letsencrypt process again"
|
||||
if [[ "$(eval $DOMAIN_CHECK)" == "200" || "$(eval $DOMAIN_CHECK)" == "301" ]]; then
|
||||
echo "DOMAIN CHECK: $DOMAIN_CHECK"
|
||||
letsencrypt_certificates
|
||||
echo "Started letsencrypt for domain: $DOMAIN second time"
|
||||
break
|
||||
|
Reference in New Issue
Block a user