bunkerweb/scripts/certbot-new.sh
2020-12-06 22:22:58 +01:00

10 lines
249 B
Bash

#!/bin/sh
# generate certificate
certbot certonly --webroot -w /acme-challenge -n -d "$1" --email "$2" --agree-tos
# fix rights
chown -R root:nginx /etc/letsencrypt
chmod -R 740 /etc/letsencrypt
find /etc/letsencrypt -type d -exec chmod 750 {} \;