From 5f1ca6b6bce14419fdcfa92045f63b99c057b72b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=CC=81lint=20Szekeres?= Date: Sun, 19 May 2019 21:32:36 +0200 Subject: [PATCH] certbot nginx reloads --- public/templates/commands.html | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/public/templates/commands.html b/public/templates/commands.html index 759e18d..ae8af52 100644 --- a/public/templates/commands.html +++ b/public/templates/commands.html @@ -41,9 +41,8 @@ sed -i -r 's/(listen .*443)/\1;#/g; s/(ssl_(certificate|certificate_key|trusted_certificate) )/#;#\1/g' /etc/nginx/nginx.conf /etc/nginx/sites-{{ isSymlink() ? 'available' : 'enabled' }}/{{ _domain }}.conf -. Configure Certbot to reload NGINX on success: - echo -e '#!/bin/bash\nnginx -t && systemctl reload nginx' | sudo tee /etc/letsencrypt/renewal-hooks/post/nginx-reload.sh - sudo chmod a+x /etc/letsencrypt/renewal-hooks/post/nginx-reload.sh +. Reload NGINX: + sudo nginx -t && sudo systemctl reload nginx . Obtain certificate{{ getDomains().length > 1 ? 's' : '' }}: certbot /etc/nginx/nginx.conf /etc/nginx/sites-{{ isSymlink() ? 'available' : 'enabled' }}/{{ _domain }}.conf -. Schedule renewing: - You're ready, Certbot will renew any certificates that expire in less than 30 days. Reload NGINX +-->. Reload NGINX: sudo nginx -t && sudo systemctl reload nginx