From c7e047fe54673faa44c7d32e54bd32eb6b5e3834 Mon Sep 17 00:00:00 2001 From: Matthew Baggett Date: Sun, 30 May 2021 21:25:14 +0200 Subject: [PATCH] Nginx/letsencrypt fiddling --- php/Dockerfile.Flavours | 2 +- php/nginx/letsencrypt.runit | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/php/Dockerfile.Flavours b/php/Dockerfile.Flavours index bdae68a..aed16c4 100644 --- a/php/Dockerfile.Flavours +++ b/php/Dockerfile.Flavours @@ -95,7 +95,7 @@ RUN apt-get -qq update && \ mv /conf/nginx.runit /etc/service/nginx/run && \ mv /conf/php-fpm.runit /etc/service/php-fpm/run && \ mv /conf/letsencrypt.runit /etc/service/letsencrypt/run && \ - mv /conf/logs-letsencrypt.runit /etc/service/logs-letsencrypt/run && \ + #mv /conf/logs-letsencrypt.runit /etc/service/logs-letsencrypt/run && \ mv /conf/logs-nginx-access.runit /etc/service/logs-nginx-access/run && \ mv /conf/logs-nginx-error.runit /etc/service/logs-nginx-error/run && \ mv /conf/logs-phpfpm-error.runit /etc/service/logs-phpfpm-error/run && \ diff --git a/php/nginx/letsencrypt.runit b/php/nginx/letsencrypt.runit index 77f1b74..9a3cc22 100755 --- a/php/nginx/letsencrypt.runit +++ b/php/nginx/letsencrypt.runit @@ -23,9 +23,9 @@ fi echo -e "To change this, change the value of LETSENCRYPT_MODE" # Give Nginx a moment to start before we kill it again. -sleep 3; +sleep 30; -echo "Certbot is running for ${LETSENCRYPT_EMAIL} / ${LETSENCRYPT_DOMAINS}..." +echo -e "Certbot is running for \e[33m${LETSENCRYPT_EMAIL}\e[0m / \e[33m${LETSENCRYPT_DOMAINS}\e[0m..." ( \ set -x; \ certbot \ @@ -38,7 +38,7 @@ echo "Certbot is running for ${LETSENCRYPT_EMAIL} / ${LETSENCRYPT_DOMAINS}..." --agree-tos \ ) -echo "Certbot complete!" +echo -e "Certbot complete!" # replace the self-certs with these lovely new certs. if [ -f "/etc/letsencrypt/live/${LETSENCRYPT_DOMAINS}/fullchain.pem" ]; then @@ -50,6 +50,6 @@ if [ -f "/etc/letsencrypt/live/${LETSENCRYPT_DOMAINS}/fullchain.pem" ]; then # Sleep for 24 hours and try again tomorrow with a renewal, just in case. sleep 86400 else - echo "LetsEncrypt \e[31mFAILED TO GENERATE CERTS\e[0m. Will try again in an hour." + echo -e "LetsEncrypt \e[31mFAILED TO GENERATE CERTS\e[0m. Will try again in an hour." sleep 3600 fi \ No newline at end of file