certbot: Move path to /usr/local/sbin.

[greg: fixed typo bug]
This commit is contained in:
Tim Abbott
2017-11-10 10:32:55 -08:00
parent 97ec56276c
commit 2afc3b9e50
2 changed files with 5 additions and 5 deletions

View File

@@ -3,4 +3,4 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
USER=root
# Cron job to renew certbot twice a day.
52 0,12 * * * root /root/certbot-auto renew --webroot --webroot-path=/var/www/certbot/ --quiet
52 0,12 * * * root /usr/local/sbin/certbot-auto renew --webroot --webroot-path=/var/www/certbot/ --quiet

View File

@@ -40,12 +40,12 @@ if [ -n "$show_help" ]; then
usage
fi
CERTBOT_PATH="/usr/local/sbin/certbot-auto"
# For reference https://certbot.eff.org/all-instructions/#debian-other-nginx
# We download to /root as a reasonably safe place with only root having access
wget https://dl.eff.org/certbot-auto -O /root/certbot-auto
chmod a+x /root/certbot-auto
wget https://dl.eff.org/certbot-auto -O "$CERTBOT_PATH"
chmod a+x "$CERTBOT_PATH"
/root/certbot-auto --standalone certonly -d "$DOMAIN" -m "$EMAIL" --agree-tos --non-interactive
"$CERTBOT_PATH" --standalone certonly -d "$DOMAIN" -m "$EMAIL" --agree-tos --non-interactive
# Link the generated cert to the path read by Zulip
ln -nsf /etc/letsencrypt/live/"$DOMAIN"/privkey.pem /etc/ssl/private/zulip.key