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
|
# check if HTTP to HTTPS is enabled
|
||||||
# then disable it temporarily
|
# 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;"
|
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
|
if [ -f /run/nginx/nginx.pid ] ; then
|
||||||
/usr/sbin/nginx -s reload
|
/usr/sbin/nginx -s reload
|
||||||
@ -20,7 +20,7 @@ fi
|
|||||||
certbot renew
|
certbot renew
|
||||||
|
|
||||||
# enable HTTP to HTTPS if needed
|
# 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;"
|
replace_in_file "/etc/nginx/nginx.conf" "#include /etc/nginx/redirect-http-to-https.conf;" "include /etc/nginx/redirect-http-to-https.conf;"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user