bunkerweb/scripts/certbot-renew.sh
2020-12-07 16:53:00 +01:00

15 lines
286 B
Bash

#!/bin/sh
# ask new certificates if needed
certbot renew
# fix rights
chown -R root:nginx /etc/letsencrypt
chmod -R 740 /etc/letsencrypt
find /etc/letsencrypt -type d -exec chmod 750 {} \;
# reload nginx
if [ -f /tmp/nginx.pid ] ; then
/usr/sbin/nginx -s reload > /dev/null 2>&1
fi