fix certbot-renew.sh syntax
This commit is contained in:
parent
834afa1327
commit
c56bde4f0c
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue