Cleaning up and commenting
This commit is contained in:
20
installer.sh
20
installer.sh
@@ -232,6 +232,7 @@ webserv="${webserv//:}" && webserv="${webserv,,}"
|
||||
declare -n CMSL="$webserv"CMSL
|
||||
declare -n options="$webserv"Options
|
||||
|
||||
#Generating APT-List for webserver
|
||||
curl --silent --show-error "$repo"/raw/branch/"$branch"/CoreModules/generic/apt.list >>/tmp/apt.list
|
||||
printf " " >>/tmp/apt.list
|
||||
|
||||
@@ -311,8 +312,8 @@ option="${option,,}" && option="${option// /}" && option="${option//:/ }" && opt
|
||||
#Combining selected option with always-on options
|
||||
option="$option""$aonoption"
|
||||
|
||||
#Generating APT-list options
|
||||
for val1 in ${option[*]}; do
|
||||
echo "$val1" #TMP
|
||||
modListed=$(wget -t7 -qO - "$repo"/raw/branch/master/extModules.list|grep "$val1")
|
||||
#Checking
|
||||
if test -z "$modListed"
|
||||
@@ -364,11 +365,11 @@ fi
|
||||
|
||||
CMS="${CMS//:}" && CMS="${CMS,,}"
|
||||
|
||||
#Generating APT-List CMS
|
||||
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
|
||||
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
|
||||
printf " " >>/tmp/apt.list
|
||||
@@ -382,14 +383,17 @@ fi
|
||||
|
||||
msg " Pre-configuring"
|
||||
|
||||
#Generic Pre-Conf
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/generic/preconf.sh)
|
||||
|
||||
#Generic WebServer
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/preconf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/preconf.sh)
|
||||
fi
|
||||
|
||||
#Preconfiguring for Modules
|
||||
for val1 in ${option[*]}; do
|
||||
echo "$val1" #TMP
|
||||
msg "Pre-configuring $val1"
|
||||
modListed=$(wget -t7 -qO - "$repo"/raw/branch/master/extModules.list|grep "$val1")
|
||||
#Checking
|
||||
if test -z "$modListed"
|
||||
@@ -412,11 +416,10 @@ for val1 in ${option[*]}; do
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
#Preconfiguring 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)
|
||||
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)
|
||||
fi
|
||||
@@ -435,14 +438,18 @@ cat /tmp/apt.list | xargs $PKGI
|
||||
# Configuring #
|
||||
##---------------##
|
||||
msg " Configuring"
|
||||
|
||||
#Configuring Generic
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/generic/conf.sh)
|
||||
|
||||
#Configuring WebServer
|
||||
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
|
||||
|
||||
#Configuring Options
|
||||
for val1 in ${option[*]}; do
|
||||
echo "$val1" #TMP
|
||||
msg " Configuring $val1"
|
||||
modListed=$(wget -t7 -qO - "$repo"/raw/branch/master/extModules.list|grep "$val1")
|
||||
#Checking
|
||||
if test -z "$modListed"
|
||||
@@ -482,6 +489,7 @@ sed -i -e 's/DOMAINname/'$domain'/' -e 's/CONFname/'$domain'/' -e 's/DomainWWW/'
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/Scripts/EnableSSL.sh -O ~/activateSSL-Backend.sh
|
||||
sed -i -e 's/DOMAINname/'$hostname'/' -e 's/CONFname/'Backend'/' -e 's/DomainWWW/'0'/' -e 's/Email/'$email'/' -e 's/WebServer/'$webserv'/' ~/activateSSL-Backend.sh
|
||||
|
||||
#Configuring 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)
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user