From e6a7d7495a1432dade47125635c94e4a5b6ed551 Mon Sep 17 00:00:00 2001 From: Erdal ALTIN Date: Tue, 31 May 2022 12:11:39 +0300 Subject: [PATCH] Update ssl-conf.sh --- ssl-conf.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ssl-conf.sh b/ssl-conf.sh index 657364c..69b8389 100644 --- a/ssl-conf.sh +++ b/ssl-conf.sh @@ -12,16 +12,18 @@ fi use_lets_encrypt_certificates() { echo "switching webserver to use Let's Encrypt certificate for $1" - sed -i 's/example.com/'$1'/g' $3/extra/httpd-ssl.conf - sed '/^#\(.*\)httpd-ssl\.conf/ s/^#//' $3/httpd.conf > $3/httpd.conf.bak sed 's/#LoadModule/LoadModule/' $3/extra/httpd-vhosts.conf > $3/extra/httpd-vhosts.conf.bak + sed 's/example.com/'$1'/g' $3/extra/httpd-ssl.conf > $3/extra/httpd-ssl.conf.bak + sed '/^#\(.*\)httpd-ssl\.conf/ s/^#//' $3/httpd.conf > $3/httpd.conf.bak } reload_apache2() { - cp $1/httpd.conf.bak $1/httpd.conf cp $1/extra/httpd-vhosts.conf.bak $1/extra/httpd-vhosts.conf - rm $1/httpd.conf.bak + cp $1/extra/httpd-ssl.conf.bak $1/extra/httpd-ssl.conf + cp $1/httpd.conf.bak $1/httpd.conf + rm $1/extra/httpd-ssl.conf.bak rm $1/extra/httpd-vhosts.conf.bak + rm $1/httpd.conf.bak echo "Starting webserver apache2 service" httpd -t }