From 9c2509308c84584ecbf460898ef29d2b1088d4a6 Mon Sep 17 00:00:00 2001 From: bprieshof Date: Wed, 11 Dec 2019 12:25:11 +0100 Subject: [PATCH] Update 'installer.sh' --- installer.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/installer.sh b/installer.sh index 7b8f908..345e599 100644 --- a/installer.sh +++ b/installer.sh @@ -364,13 +364,13 @@ cat /tmp/apt.list | xargs $PKGI ##---------------## -echo "Running preconf for Webserv" +echo "Running conf for Webserv" if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/conf.sh; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/conf.sh) fi -echo "Running preconf for Options" +echo "Running conf for Options" for val1 in ${option[*]}; do echo $val1 #TMP @@ -382,7 +382,24 @@ for val1 in ${option[*]}; do fi done -echo "Running preconf for CMS" +echo "Setting up SSL" +if [ $sslenable = 1 ]; then +if [ $domainwww = 1 ]; then + certbot --"$webserv" -n -d "$domain" -d "www.$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos +elif [ $domainwww = 0 ]; then + certbot --"$webserv" -n -d "$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos +fi + certbot --"$webserv" -n -d "$hostname" -m "$email" --hsts --redirect --no-eff-email --agree-tos +fi + +wget -q -t7 "$repo"/raw/branch/"$branch"/Scripts/EnableSSL.sh -O ~/activateSSL-$domain.sh +sed -i -e 's/DOMAINname/'$domain'/' -e 's/DomainWWW/'$domainwww'/' -e 's/Email/'$email'/' -e 's/WebServer/'$webserv'/' ~/activateSSL-$domain.sh + +wget -q -t7 "$repo"/raw/branch/"$branch"/Scripts/EnableSSL.sh -O ~/activateSSL-HostName.sh +sed -i -e 's/DOMAINname/'$hostname'/' -e 's/DomainWWW/'0'/' -e 's/Email/'$email'/' -e 's/WebServer/'$webserv'/' ~/activateSSL-HostName.sh + + +echo "Running conf for CMS" if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/conf.sh; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CMS/"$CMS"/conf.sh)