Files
nginx-php-fpm/scripts/letsencrypt-renew
2016-07-26 15:09:00 +01:00

14 lines
254 B
Bash
Executable File

#!/bin/bash
# Lets Encrypt
if [ -z "$DOMAIN" ]; then
echo "You need to have \$DOMAIN set"
else
if [ -f /etc/letsencrypt/live/${DOMAIN}/fullchain.pem ]; then
certbot renew
supervisorctl restart nginx
else
echo "There is no cert to renew"
fi
fi