Try to prevent any collisions between upgrades and letsencrypt certificate updates
This commit is contained in:
parent
58b059c803
commit
e20a24a9ca
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue