You can put the systemctl reload nginx
part in the --deploy-hook
option so it will automatically reload nginx when certbot succesfully renewed a certificate. See official certbot documentation about renewing for more info. It'll only be stored for that current certificate. If you have multiple certs where you'd like to use the hook, you'd need to run certbot with that extra option for every cert you'd like to enable it. As far as I know, this can be done by certbot renew --cert-name <certificate name from certbot certificates> --deploy-hook "<your deploy hook>"
4 Likes