Skip to content

Commit

Permalink
Update renew.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
openspeedtest committed Aug 27, 2023
1 parent f26380a commit 2f66e6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions files/renew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ fullchain_path="/var/log/letsencrypt/live/${DOMAIN_NAME}/fullchain.pem"

if [ "$ENABLE_LETSENCRYPT" = True ] && [ "$DOMAIN_NAME" ] && [ "$USER_EMAIL" ]; then

certbot renew --force-renewal
certbot certonly -n --webroot --webroot-path /usr/share/nginx/html --no-redirect --agree-tos --email "$USER_EMAIL" -d "$DOMAIN_NAME" --config-dir /var/log/letsencrypt/ --work-dir /var/log/letsencrypt/work --logs-dir /var/log/letsencrypt/log
if [ $? -eq 0 ]; then
echo "certbot renew --force-renewal Executed."
echo "certbot certonly -n... Executed."
if [ -f "$fullchain_path" ]; then
nginx -s reload
else
echo "letsencrypt Certificates Not Found!"
fi
else
echo "certbot renew --force-renewal Failed."
echo "certbot certonly -n... Failed."
fi

fi
fi

0 comments on commit 2f66e6f

Please sign in to comment.