Updated config fetcher for Options
Updated to support external modules
This commit is contained in:
89
installer.sh
89
installer.sh
@@ -280,19 +280,31 @@ fi
|
|||||||
|
|
||||||
option="${option// /}" && option="${option/:/ }" && option="${option//:}" && option="${option,,}" && option="${option//'"'}"
|
option="${option// /}" && option="${option/:/ }" && option="${option//:}" && option="${option,,}" && option="${option//'"'}"
|
||||||
|
|
||||||
echo "Generating Apt List for options"
|
echo "Generating apt list for Options"
|
||||||
for val1 in ${option[*]}; do
|
for val1 in ${option[*]}; do
|
||||||
echo $val1 #TMP
|
echo "$val1" #TMP
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-apt.list; then
|
modListed=$(wget -t7 -qO - "$repo"/raw/branch/master/extModules.txt|grep "$val1")
|
||||||
curl "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-apt.list >>/tmp/apt.list
|
#Checking
|
||||||
fi
|
if test -z "$modListed"
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/apt.list; then
|
then
|
||||||
curl "$repo"/raw/branch/"$branch"/SubModules/"$val1"/apt.list >>/tmp/apt.list
|
#Fetching from local repo
|
||||||
fi
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/apt.list; then
|
||||||
|
curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/apt.list >>/tmp/apt.list
|
||||||
|
fi
|
||||||
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-apt.list; then
|
||||||
|
curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-apt.list >>/tmp/apt.list
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
#Fetching from remote repo
|
||||||
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$modListed"apt.list; then
|
||||||
|
curl --retry 7 --retry-delay 5 -s "$modListed"apt.list >>/tmp/apt.list
|
||||||
|
fi
|
||||||
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$modListed""$webserv"-apt.list; then
|
||||||
|
curl "$modListed""$webserv"-apt.list >>/tmp/apt.list
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
##-------##
|
##-------##
|
||||||
# CMS #
|
# CMS #
|
||||||
##-------##
|
##-------##
|
||||||
@@ -369,13 +381,27 @@ fi
|
|||||||
|
|
||||||
echo "Running preconf for Options"
|
echo "Running preconf for Options"
|
||||||
for val1 in ${option[*]}; do
|
for val1 in ${option[*]}; do
|
||||||
echo $val1 #TMP
|
echo "$val1" #TMP
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/preconf.sh; then
|
modListed=$(wget -t7 -qO - "$repo"/raw/branch/master/extModules.txt|grep "$val1")
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/preconf.sh)
|
#Checking
|
||||||
fi
|
if test -z "$modListed"
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh; then
|
then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh)
|
#Fetching from local repo
|
||||||
fi
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/preconf.sh; then
|
||||||
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/preconf.sh)
|
||||||
|
fi
|
||||||
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh; then
|
||||||
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh)
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
#Fetching from remote repo
|
||||||
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$modListed"preconf.sh; then
|
||||||
|
source <(curl --retry 7 --retry-delay 5 -s "$modListed"preconf.sh)
|
||||||
|
fi
|
||||||
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$modListed""$webserv"-preconf.sh; then
|
||||||
|
source <(curl --retry 7 --retry-delay 5 -s "$modListed""$webserv"-preconf.sh)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Running preconf for CMS"
|
echo "Running preconf for CMS"
|
||||||
@@ -410,14 +436,27 @@ fi
|
|||||||
|
|
||||||
echo "Running conf for Options"
|
echo "Running conf for Options"
|
||||||
for val1 in ${option[*]}; do
|
for val1 in ${option[*]}; do
|
||||||
echo $val1 #TMP
|
echo "$val1" #TMP
|
||||||
|
modListed=$(wget -t7 -qO - "$repo"/raw/branch/master/extModules.txt|grep "$val1")
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/conf.sh; then
|
#Checking
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/conf.sh)
|
if test -z "$modListed"
|
||||||
fi
|
then
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh; then
|
#Fetching from local repo
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh)
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/conf.sh; then
|
||||||
fi
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/conf.sh)
|
||||||
|
fi
|
||||||
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh; then
|
||||||
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh)
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
#Fetching from remote repo
|
||||||
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$modListed"conf.sh; then
|
||||||
|
source <(curl --retry 7 --retry-delay 5 -s "$modListed"conf.sh)
|
||||||
|
fi
|
||||||
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$modListed""$webserv"-conf.sh; then
|
||||||
|
source <(curl --retry 7 --retry-delay 5 -s "$modListed""$webserv"-conf.sh)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Setting up SSL"
|
echo "Setting up SSL"
|
||||||
|
|||||||
Reference in New Issue
Block a user