diff --git a/Scripts/EnableSSL.sh b/Scripts/EnableSSL.sh index eff97f0..e76d0d7 100644 --- a/Scripts/EnableSSL.sh +++ b/Scripts/EnableSSL.sh @@ -12,9 +12,9 @@ if [ $webservice = apache ]; then fi #Backing-up and removing current config -sed -n '/#beginConf/,/#endConf/p' /etc/"$webservice"/sites-enabled/"$CONFname" > /tmp/"$CONFname"-config -sed -n -i '/#beginConf/{:a;N;/#endConf/!ba;N;s/.*\n/#ConfHere1\n/};p' /etc/"$webservice"/sites-enabled/"$CONFname" -systemctl restart $webservice +sed -n '/#beginConf/,/#endConf/p' /etc/"$webservice"/sites-enabled/"$confname" > /tmp/"$confname"-config +sed -n -i '/#beginConf/{:a;N;/#endConf/!ba;N;s/.*\n/#ConfHere1\n/};p' /etc/"$webservice"/sites-enabled/"$confname" +systemctl reload $webservice #Enabling SSL if [ $domainwww = 1 ]; then @@ -24,6 +24,6 @@ elif [ $domainwww = 0 ]; then fi #Restoring config -sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e "/#ConfHere1/ r /tmp/"$CONFname"-config" -e '/#ConfHere/c\' /etc/"$webservice"/sites-enabled/"$CONFname" +sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e "/#ConfHere1/ r /tmp/"$confname"-config" -e '/#ConfHere/c\' /etc/"$webservice"/sites-enabled/"$CONFname" -systemctl restart $webservice \ No newline at end of file +systemctl reload $webservice \ No newline at end of file