From 70baf37abcd41d22a204d14f59f7214e5f3863c0 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 4 Jan 2019 22:42:18 -0700 Subject: [PATCH] unset existing variables on script start --- setup.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index f63f0bc..8043d7e 100644 --- a/setup.sh +++ b/setup.sh @@ -6,7 +6,7 @@ ####### -# text formatting ansi codes +### text formatting ansi codes err="\e[1;31m" ok="\e[1;32m" warn="\e[93m" @@ -15,13 +15,19 @@ cyan="\e[96m" norm="\e[0m" -# set variables +### set variables + +unset IP4 +unset useCertbot +unset CertbotDomain +unset CertPath + detectedIP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p') regexIP4="(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])" regexHostname="(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])" -# quick intro for the user +### quick intro for the user echo -e "\n${mag}This script will customize the provided NGINX template files for your" echo "environment. You will be prompted for all necessary information. After that," echo "default error pages will be copied to your webroot and your NGINX configuration"