diff --git a/src/freedombone-utils-web b/src/freedombone-utils-web index ac45b0b8..9c3b8b0f 100755 --- a/src/freedombone-utils-web +++ b/src/freedombone-utils-web @@ -315,6 +315,13 @@ function letsencrypt_renewals { # the main script tries to renew once per month { echo '#!/bin/bash'; + echo ''; + echo 'if [ -f /tmp/.upgrading ]; then'; + echo ' if [ ! -f ~/letsencrypt_failed ]; then'; + echo ' touch ~/letsencrypt_failed'; + echo ' fi'; + echo ' exit 0'; + echo 'fi'; echo ''; echo "PROJECT_NAME='${PROJECT_NAME}'"; echo "COMPLETION_FILE=\$HOME/\${PROJECT_NAME}-completed.txt"; @@ -329,6 +336,14 @@ function letsencrypt_renewals { echo "}')"; echo " ADMIN_EMAIL_ADDRESS=\$ADMIN_USERNAME@\$HOSTNAME"; echo ' for d in /etc/letsencrypt/live/*/ ; do'; + echo ''; + echo ' if [ -f /tmp/.upgrading ]; then'; + echo ' if [ ! -f ~/letsencrypt_failed ]; then'; + echo ' touch ~/letsencrypt_failed'; + echo ' fi'; + echo ' exit 0'; + echo ' fi'; + echo ''; echo -n " LETSENCRYPT_DOMAIN=\$(echo \"\$d\" | "; echo -n "awk -F '/' '{print "; echo -n "\$5"; @@ -366,6 +381,9 @@ function letsencrypt_renewals { { echo '#!/bin/bash'; echo ''; echo 'if [ -f /tmp/.upgrading ]; then'; + echo ' if [ ! -f ~/letsencrypt_failed ]; then'; + echo ' touch ~/letsencrypt_failed'; + echo ' fi'; echo ' exit 0'; echo 'fi'; echo ''; @@ -383,6 +401,9 @@ function letsencrypt_renewals { echo ' for d in /etc/letsencrypt/live/*/ ; do'; echo ''; echo ' if [ -f /tmp/.upgrading ]; then'; + echo ' if [ ! -f ~/letsencrypt_failed ]; then'; + echo ' touch ~/letsencrypt_failed'; + echo ' fi'; echo ' exit 0'; echo ' fi'; echo '';