From 4e37d7bb313c38fad8f70b64be0900c477cbab4d Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Mon, 7 Jan 2019 21:28:32 -0700 Subject: [PATCH] clear all vars --- setup.sh | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/setup.sh b/setup.sh index df9830a..b54f209 100755 --- a/setup.sh +++ b/setup.sh @@ -17,28 +17,44 @@ norm="\e[0m" ### set variables -# clear variables +# clear all variables +unset detectedIP +unset inputIP unset IP4 +unset inputServerName +serverNames_working=() +serverNames=() +unset useSSL unset useCertbot +unset inputCertbotDomain +certbotBadFile=() unset CertbotDomain +certbotFiles=() +unset inputCertPath +unset inputKeyPath +unset inputCAChainPath unset CertPath unset KeyPath unset CAChainPath -unset DHPath -unset phpType unset noOSCP +unset inputDHPath +unset generateDH +unset DHPath +unset usePHP +unset inputPHPType +unset phpType +unset inputPHPAddr +unset inputPHPPort +unset phpAddr +unset phpPort +unset phpSock # set variables 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])" regexIP6="(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))" 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])" -useSSL=1 -serverNames_working=() -serverNames=() detectedIP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p') certbotFiles=(cert.pem chain.pem fullchain.pem privkey.pem) -generateDH=0 -usePHP=1 hostname=$(hostname) configPath="./etc.${hostname}"