From c56bde4f0c72304d0bdf710b080e06e4fedf519b Mon Sep 17 00:00:00 2001 From: bunkerity Date: Sat, 28 Mar 2020 23:31:30 +0100 Subject: [PATCH] fix certbot-renew.sh syntax --- scripts/certbot-renew.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/certbot-renew.sh b/scripts/certbot-renew.sh index 171bebe..643e0be 100644 --- a/scripts/certbot-renew.sh +++ b/scripts/certbot-renew.sh @@ -9,7 +9,7 @@ function replace_in_file() { # check if HTTP to HTTPS is enabled # then disable it temporarily -if [ grep -q "include /etc/nginx/redirect-http-to-https.conf;" "/etc/nginx/nginx.conf" ] ; then +if grep -q "include /etc/nginx/redirect-http-to-https.conf;" "/etc/nginx/nginx.conf" ; then replace_in_file "/etc/nginx/nginx.conf" "include /etc/nginx/redirect-http-to-https.conf;" "#include /etc/nginx/redirect-http-to-https.conf;" if [ -f /run/nginx/nginx.pid ] ; then /usr/sbin/nginx -s reload @@ -20,7 +20,7 @@ fi certbot renew # enable HTTP to HTTPS if needed -if [ grep -q "#include /etc/nginx/redirect-http-to-https.conf;" "/etc/nginx/nginx.conf" ] ; then +if grep -q "#include /etc/nginx/redirect-http-to-https.conf;" "/etc/nginx/nginx.conf" ; then replace_in_file "/etc/nginx/nginx.conf" "#include /etc/nginx/redirect-http-to-https.conf;" "include /etc/nginx/redirect-http-to-https.conf;" fi