Added branchtype to allow for tags
This commit is contained in:
40
AppendCMS.sh
40
AppendCMS.sh
@@ -8,7 +8,7 @@ if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then
|
||||
source /etc/ICTM/selopts.list
|
||||
source /etc/ICTM/mainvar.list
|
||||
rm /tmp/apt.list
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/ModulesMenu.list)
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list)
|
||||
|
||||
#Setting Menulist to webserver
|
||||
declare -n CMSL="$webserv"CMSL
|
||||
@@ -153,13 +153,13 @@ CMS="${CMS//:}" && CMS="${CMS,,}"
|
||||
# AptList #
|
||||
##-----------##
|
||||
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/apt.list >>/tmp/apt.list; then
|
||||
curl "$repo"/raw/branch/"$branch"/CMS/"$CMS"/apt.list >>/tmp/apt.list
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/apt.list >>/tmp/apt.list; then
|
||||
curl "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/apt.list >>/tmp/apt.list
|
||||
printf " " >>/tmp/apt.list
|
||||
fi
|
||||
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-apt.list; then
|
||||
curl "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-apt.list >>/tmp/apt.list
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-apt.list; then
|
||||
curl "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-apt.list >>/tmp/apt.list
|
||||
printf " " >>/tmp/apt.list
|
||||
fi
|
||||
|
||||
@@ -169,17 +169,17 @@ fi
|
||||
##-----------##
|
||||
|
||||
msg " Running preconf for Webserv"
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/appendCMS-preconf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/appendCMS-preconf.sh)
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/appendCMS-preconf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/appendCMS-preconf.sh)
|
||||
fi
|
||||
|
||||
msg " Running preconf for CMS"
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/preconf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CMS/"$CMS"/preconf.sh)
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/preconf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/preconf.sh)
|
||||
fi
|
||||
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh)
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh)
|
||||
fi
|
||||
|
||||
|
||||
@@ -197,8 +197,8 @@ cat /tmp/apt.list | xargs $PKGI
|
||||
##---------------##
|
||||
|
||||
msg " Running conf for Webserv"
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/appendCMS-conf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/appendCMS-conf.sh)
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/appendCMS-conf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/appendCMS-conf.sh)
|
||||
fi
|
||||
|
||||
if [ $sslenable = 1 ]; then
|
||||
@@ -214,22 +214,22 @@ msg " Setting up SSL"
|
||||
elif [ $domainwww = 0 ]; then
|
||||
certbot --"$certwebserv" certonly -n -d "$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos
|
||||
fi
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/ssl-handler.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/ssl-handler.sh)
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/ssl-handler.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/ssl-handler.sh)
|
||||
fi
|
||||
elif [ $sslenable = 0 ]; then
|
||||
site_ext=nossl
|
||||
fi
|
||||
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/Scripts/EnableSSL.sh -O ~/activateSSL-$domain.sh
|
||||
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/Scripts/EnableSSL.sh -O ~/activateSSL-$domain.sh
|
||||
sed -i -e 's/DOMAINname/'$domain'/' -e 's/CONFname/'$sitename'/' -e 's/DomainWWW/'$domainwww'/' -e 's/Email/'$email'/' -e 's/WebServer/'$webserv'/' ~/activateSSL-$domain.sh
|
||||
|
||||
msg " 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)
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/conf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/conf.sh)
|
||||
fi
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-conf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-conf.sh)
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-conf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-conf.sh)
|
||||
fi
|
||||
|
||||
##--------------------------##
|
||||
|
||||
Reference in New Issue
Block a user