From 5e718e8caef7537f01c43528594276b016221d41 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Fri, 4 Sep 2020 13:12:20 +0200 Subject: [PATCH] Made EnableSSL compatible with nginx_nonphp --- Scripts/EnableSSL.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Scripts/EnableSSL.sh b/Scripts/EnableSSL.sh index 7acabcf..d50388a 100644 --- a/Scripts/EnableSSL.sh +++ b/Scripts/EnableSSL.sh @@ -14,6 +14,12 @@ if [ $webservice = apache ]; then ext=.conf fi +#Correcting service name for nginx_nonphp +if [ $webservice = nginx_nonphp ]; then + webservice=nginx + webserv=nginx +fi + #Backing-up and removing current config sed -n '/#beginConf/,/#endConf/p' /etc/"$webservice"/sites-available/"$sitename"_nossl"$ext" > /tmp/"$sitename"-config sed -n -i '/#beginConf/{:a;N;/#endConf/!ba;N;s/.*\n/#ConfHere\n/};p' /etc/"$webservice"/sites-available/"$sitename"_nossl"$ext"