diff --git a/src/freedombone-utils-git b/src/freedombone-utils-git index 558066ee..398d2e78 100755 --- a/src/freedombone-utils-git +++ b/src/freedombone-utils-git @@ -50,6 +50,9 @@ function git_pull { git branch -D "$2" # check out the new branch if ! git checkout "$2" -b "$2"; then + if [ -f /tmp/.upgrading ]; then + rm /tmp/.upgrading + fi echo $"Unable to checkout $1 $2" exit 72357 fi diff --git a/src/freedombone-utils-web b/src/freedombone-utils-web index 20a4b875..ac45b0b8 100755 --- a/src/freedombone-utils-web +++ b/src/freedombone-utils-web @@ -364,6 +364,10 @@ function letsencrypt_renewals { # a secondary script keeps trying to renew after a failure { echo '#!/bin/bash'; + echo ''; + echo 'if [ -f /tmp/.upgrading ]; then'; + echo ' exit 0'; + echo 'fi'; echo ''; echo "PROJECT_NAME='${PROJECT_NAME}'"; echo "COMPLETION_FILE=\$HOME/\${PROJECT_NAME}-completed.txt"; @@ -377,6 +381,11 @@ 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 ' exit 0'; + echo ' fi'; + echo ''; echo -n " LETSENCRYPT_DOMAIN=\$(echo \"\$d\" | "; echo -n "awk -F '/' '{print "; echo -n "\$5";