setup-certbot: Reinstate nginx reload after installation.

If nginx was already installed, and we're using the webroot method of
initializing certbot, nginx needs to be reloaded.  Hooks in
`/etc/letsencrypt/renewal-hooks/deploy/` do not run during initial
`certbot certonly`, so an explicit reload is required.
This commit is contained in:
Alex Vandiver 2021-12-10 14:34:41 -08:00 committed by Tim Abbott
parent e4b23daad7
commit f6520a97cd
1 changed files with 8 additions and 0 deletions

View File

@ -125,4 +125,12 @@ if [ -z "$skip_symlink" ]; then
symlink_with_backup "$CERT_DIR"/fullchain.pem /etc/ssl/certs/zulip.combined-chain.crt symlink_with_backup "$CERT_DIR"/fullchain.pem /etc/ssl/certs/zulip.combined-chain.crt
fi fi
# "certbot certonly" does not run deploy hooks, so reload nginx if
# need be to pick up the new certificate.
case "$method" in
webroot)
service nginx reload
;;
esac
echo "Certbot SSL certificate configuration succeeded." echo "Certbot SSL certificate configuration succeeded."