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/selopts.list
|
||||||
source /etc/ICTM/mainvar.list
|
source /etc/ICTM/mainvar.list
|
||||||
rm /tmp/apt.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
|
#Setting Menulist to webserver
|
||||||
declare -n CMSL="$webserv"CMSL
|
declare -n CMSL="$webserv"CMSL
|
||||||
@@ -153,13 +153,13 @@ CMS="${CMS//:}" && CMS="${CMS,,}"
|
|||||||
# AptList #
|
# 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
|
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/branch/"$branch"/CMS/"$CMS"/apt.list >>/tmp/apt.list
|
curl "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/apt.list >>/tmp/apt.list
|
||||||
printf " " >>/tmp/apt.list
|
printf " " >>/tmp/apt.list
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-apt.list; then
|
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/branch/"$branch"/CMS/"$CMS"/"$webserv"-apt.list >>/tmp/apt.list
|
curl "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-apt.list >>/tmp/apt.list
|
||||||
printf " " >>/tmp/apt.list
|
printf " " >>/tmp/apt.list
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -169,17 +169,17 @@ fi
|
|||||||
##-----------##
|
##-----------##
|
||||||
|
|
||||||
msg " Running preconf for Webserv"
|
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
|
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/branch/"$branch"/CoreModules/"$webserv"/appendCMS-preconf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/appendCMS-preconf.sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg " Running preconf for CMS"
|
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
|
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/branch/"$branch"/CMS/"$CMS"/preconf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/preconf.sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh; then
|
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/branch/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -197,8 +197,8 @@ cat /tmp/apt.list | xargs $PKGI
|
|||||||
##---------------##
|
##---------------##
|
||||||
|
|
||||||
msg " Running conf for Webserv"
|
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
|
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/branch/"$branch"/CoreModules/"$webserv"/appendCMS-conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/appendCMS-conf.sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $sslenable = 1 ]; then
|
if [ $sslenable = 1 ]; then
|
||||||
@@ -214,22 +214,22 @@ msg " Setting up SSL"
|
|||||||
elif [ $domainwww = 0 ]; then
|
elif [ $domainwww = 0 ]; then
|
||||||
certbot --"$certwebserv" certonly -n -d "$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos
|
certbot --"$certwebserv" certonly -n -d "$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/ssl-handler.sh; then
|
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/branch/"$branch"/CoreModules/"$webserv"/ssl-handler.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/ssl-handler.sh)
|
||||||
fi
|
fi
|
||||||
elif [ $sslenable = 0 ]; then
|
elif [ $sslenable = 0 ]; then
|
||||||
site_ext=nossl
|
site_ext=nossl
|
||||||
fi
|
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
|
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"
|
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
|
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/branch/"$branch"/CMS/"$CMS"/conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/conf.sh)
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-conf.sh; then
|
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/branch/"$branch"/CMS/"$CMS"/"$webserv"-conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-conf.sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##--------------------------##
|
##--------------------------##
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then
|
|||||||
source /etc/ICTM/selopts.list
|
source /etc/ICTM/selopts.list
|
||||||
source /etc/ICTM/mainvar.list
|
source /etc/ICTM/mainvar.list
|
||||||
rm /tmp/apt.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
|
#Setting Menulist to webserver
|
||||||
declare -n CMSL="$webserv"CMSL
|
declare -n CMSL="$webserv"CMSL
|
||||||
@@ -151,17 +151,17 @@ option="$option""$aonoption"
|
|||||||
msg " Generating apt list for Options"
|
msg " Generating apt list 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.list|grep "$val1")
|
modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1")
|
||||||
#Checking
|
#Checking
|
||||||
if test -z "$modListed"
|
if test -z "$modListed"
|
||||||
then
|
then
|
||||||
#Fetching from local repo
|
#Fetching from local repo
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/apt.list; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/apt.list; then
|
||||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/apt.list >>/tmp/apt.list
|
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/apt.list >>/tmp/apt.list
|
||||||
printf " " >>/tmp/apt.list
|
printf " " >>/tmp/apt.list
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-apt.list; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$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
|
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/"$webserv"-apt.list >>/tmp/apt.list
|
||||||
printf " " >>/tmp/apt.list
|
printf " " >>/tmp/apt.list
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -185,16 +185,16 @@ done
|
|||||||
msg " Running preconf for Options"
|
msg " Running preconf 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.list|grep "$val1")
|
modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1")
|
||||||
#Checking
|
#Checking
|
||||||
if test -z "$modListed"
|
if test -z "$modListed"
|
||||||
then
|
then
|
||||||
#Fetching from local repo
|
#Fetching from local repo
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/preconf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/preconf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/preconf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/preconf.sh)
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh)
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
#Fetching from remote repo
|
#Fetching from remote repo
|
||||||
@@ -224,16 +224,16 @@ cat /tmp/apt.list | xargs $PKGI
|
|||||||
msg " Running conf for Options"
|
msg " 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.list|grep "$val1")
|
modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1")
|
||||||
#Checking
|
#Checking
|
||||||
if test -z "$modListed"
|
if test -z "$modListed"
|
||||||
then
|
then
|
||||||
#Fetching from local repo
|
#Fetching from local repo
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/conf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/conf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/conf.sh)
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh)
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
#Fetching from remote repo
|
#Fetching from remote repo
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/Backend/apache-siteBackend-unconfigured -O /tmp/apache-siteconf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/apache-siteBackend-unconfigured -O /tmp/apache-siteconf
|
||||||
sed -i -e 's/PHPver/'$phpver'/' -e 's/DOMAINname/'$hostname'/' /tmp/apache-siteconf
|
sed -i -e 's/PHPver/'$phpver'/' -e 's/DOMAINname/'$hostname'/' /tmp/apache-siteconf
|
||||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/Backend_"$site_ext".conf
|
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/Backend_"$site_ext".conf
|
||||||
systemctl reload apache2
|
systemctl reload apache2
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#Backend PHP Pool
|
#Backend PHP Pool
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/Backend/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/Backend.conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/Backend.conf
|
||||||
sed -i 's/PHPver/'$phpver'/' /etc/php/"$phpver"/fpm/pool.d/Backend.conf
|
sed -i 's/PHPver/'$phpver'/' /etc/php/"$phpver"/fpm/pool.d/Backend.conf
|
||||||
groupadd Backend
|
groupadd Backend
|
||||||
useradd -g Backend Backend
|
useradd -g Backend Backend
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/Backend/nginx-siteBackend-unconfigured -O /tmp/nginx-backendconf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/nginx-siteBackend-unconfigured -O /tmp/nginx-backendconf
|
||||||
sed -i -e 's/PHPver/'$phpver'/' -e 's/DOMAINname/'$hostname'/' /tmp/nginx-backendconf
|
sed -i -e 's/PHPver/'$phpver'/' -e 's/DOMAINname/'$hostname'/' /tmp/nginx-backendconf
|
||||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-backendconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/Backend_"$site_ext"
|
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-backendconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/Backend_"$site_ext"
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#Apache
|
#Apache
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/nextcloud/Apache-unconfigured -O /tmp/apache-siteconf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/Apache-unconfigured -O /tmp/apache-siteconf
|
||||||
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/apache-siteconf
|
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/apache-siteconf
|
||||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/"$sitename"_"$site_ext".conf
|
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/"$sitename"_"$site_ext".conf
|
||||||
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#PHP Pool
|
#PHP Pool
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/nextcloud/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf
|
||||||
sed -i -e 's/PHPver/'$phpver'/' -e 's/SITEname/'$sitename'/' -e 's/DOMAINname/'$domain'/' /etc/php/"$phpver"/fpm/pool.d/$sitename.conf
|
sed -i -e 's/PHPver/'$phpver'/' -e 's/SITEname/'$sitename'/' -e 's/DOMAINname/'$domain'/' /etc/php/"$phpver"/fpm/pool.d/$sitename.conf
|
||||||
groupadd "$sitename"
|
groupadd "$sitename"
|
||||||
useradd -g "$sitename" "$sitename"
|
useradd -g "$sitename" "$sitename"
|
||||||
@@ -39,9 +39,9 @@ EOF
|
|||||||
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
||||||
|
|
||||||
#Makeing nextcloud Finalize script and setting login Notice
|
#Makeing nextcloud Finalize script and setting login Notice
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/nextcloud/nextcloud-init.sh -O ~/NextcloudInit-"$sitename".sh
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/nextcloud-init.sh -O ~/NextcloudInit-"$sitename".sh
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' ~/NextcloudInit-"$sitename".sh
|
sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' ~/NextcloudInit-"$sitename".sh
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/nextcloud/MotdNextCloud -O /etc/update-motd.d/51-nextnotice
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/MotdNextCloud -O /etc/update-motd.d/51-nextnotice
|
||||||
sed -i -e 's/SITEname/'$sitename'/' /etc/update-motd.d/51-nextnotice
|
sed -i -e 's/SITEname/'$sitename'/' /etc/update-motd.d/51-nextnotice
|
||||||
chmod +x /etc/update-motd.d/51-nextnotice
|
chmod +x /etc/update-motd.d/51-nextnotice
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ chmod 774 -R /var/log/nextcloud
|
|||||||
ln -s /var/www/"$domain"/html/data/nextcloud.log /var/log/nextcloud/"$sitename"
|
ln -s /var/www/"$domain"/html/data/nextcloud.log /var/log/nextcloud/"$sitename"
|
||||||
|
|
||||||
#fail2ban
|
#fail2ban
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/Jails/nextcloud_unconfigured -O /etc/fail2ban/jail.d/"$sitename"-nextcloud.local
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/nextcloud_unconfigured -O /etc/fail2ban/jail.d/"$sitename"-nextcloud.local
|
||||||
sed -i 's/SITEname/'$sitename'/' /etc/fail2ban/jail.d/"$sitename"-nextcloud.local
|
sed -i 's/SITEname/'$sitename'/' /etc/fail2ban/jail.d/"$sitename"-nextcloud.local
|
||||||
|
|
||||||
systemctl reload php"$phpver"-fpm
|
systemctl reload php"$phpver"-fpm
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#Nextcloud major release version
|
#Nextcloud major release version
|
||||||
|
|
||||||
#Configuring nginx
|
#Configuring nginx
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/nextcloud/Nginx-unconfigured -O /tmp/nginx-siteconf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/Nginx-unconfigured -O /tmp/nginx-siteconf
|
||||||
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf
|
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf
|
||||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext"
|
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext"
|
||||||
if [ $sslenable = 0 ]; then
|
if [ $sslenable = 0 ]; then
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/none/Apache-unconfigured -O /tmp/apache-siteconf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Apache-unconfigured -O /tmp/apache-siteconf
|
||||||
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/apache-siteconf
|
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/apache-siteconf
|
||||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/"$sitename"_"$site_ext".conf
|
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/"$sitename"_"$site_ext".conf
|
||||||
mkdir -p /var/www/"$domain"/html
|
mkdir -p /var/www/"$domain"/html
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
if [ $webserv != nginx_nonphp ]; then
|
if [ $webserv != nginx_nonphp ]; then
|
||||||
|
|
||||||
#Setup PHP Pool
|
#Setup PHP Pool
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/none/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf
|
||||||
sed -i -e 's/PHPver/'$phpver'/' -e 's/SITEname/'$sitename'/' -e 's/DOMAINname/'$domain'/' /etc/php/"$phpver"/fpm/pool.d/$sitename.conf
|
sed -i -e 's/PHPver/'$phpver'/' -e 's/SITEname/'$sitename'/' -e 's/DOMAINname/'$domain'/' /etc/php/"$phpver"/fpm/pool.d/$sitename.conf
|
||||||
groupadd "$sitename"
|
groupadd "$sitename"
|
||||||
useradd -g "$sitename" "$sitename"
|
useradd -g "$sitename" "$sitename"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/none/Nginx-unconfigured -O /tmp/nginx-siteconf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Nginx-unconfigured -O /tmp/nginx-siteconf
|
||||||
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf
|
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf
|
||||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext"
|
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext"
|
||||||
mkdir -p /var/www/"$domain"/html
|
mkdir -p /var/www/"$domain"/html
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/none/Nginx_nonphp-unconfigured -O /tmp/nginx-siteconf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Nginx_nonphp-unconfigured -O /tmp/nginx-siteconf
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf
|
sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf
|
||||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext"
|
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext"
|
||||||
mkdir -p /var/www/"$domain"/html
|
mkdir -p /var/www/"$domain"/html
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/wordpress/Apache-unconfigured -O /tmp/apache-siteconf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Apache-unconfigured -O /tmp/apache-siteconf
|
||||||
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/apache-siteconf
|
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/apache-siteconf
|
||||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/"$sitename"_"$site_ext".conf
|
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/"$sitename"_"$site_ext".conf
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ tar -C /var/www/"$domain"/html -xzf /tmp/wp.tar.gz --strip 1
|
|||||||
rm /var/www/"$domain"/html/wp-config-sample.php
|
rm /var/www/"$domain"/html/wp-config-sample.php
|
||||||
|
|
||||||
#Configuring WordPress
|
#Configuring WordPress
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/wordpress/WordPress-unconfigured -O /var/www/"$domain"/html/wp-config.php
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/WordPress-unconfigured -O /var/www/"$domain"/html/wp-config.php
|
||||||
sed -i -e 's/DBPass/'$db_pass'/' -e 's/DBUser/'$db_user'/' -e 's/DBName/'$db_name'/' -e 's/DOMAINname/'$domain'/' /var/www/"$domain"/html/wp-config.php
|
sed -i -e 's/DBPass/'$db_pass'/' -e 's/DBUser/'$db_user'/' -e 's/DBName/'$db_name'/' -e 's/DOMAINname/'$domain'/' /var/www/"$domain"/html/wp-config.php
|
||||||
printf '%s\n' "g/WPsalty/d" a "$WPSalts" . w | ed -s /var/www/"$domain"/html/wp-config.php
|
printf '%s\n' "g/WPsalty/d" a "$WPSalts" . w | ed -s /var/www/"$domain"/html/wp-config.php
|
||||||
|
|
||||||
#PHP Pool
|
#PHP Pool
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/wordpress/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf
|
||||||
sed -i -e 's/PHPver/'$phpver'/' -e 's/SITEname/'$sitename'/' -e 's/DOMAINname/'$domain'/' /etc/php/"$phpver"/fpm/pool.d/$sitename.conf
|
sed -i -e 's/PHPver/'$phpver'/' -e 's/SITEname/'$sitename'/' -e 's/DOMAINname/'$domain'/' /etc/php/"$phpver"/fpm/pool.d/$sitename.conf
|
||||||
groupadd "$sitename"
|
groupadd "$sitename"
|
||||||
useradd -g "$sitename" "$sitename"
|
useradd -g "$sitename" "$sitename"
|
||||||
@@ -41,15 +41,15 @@ systemctl reload php"$phpver"-fpm
|
|||||||
|
|
||||||
#fail2ban
|
#fail2ban
|
||||||
if [ ! -f /etc/fail2ban/jail.d/wordpress-syslog.local ]; then
|
if [ ! -f /etc/fail2ban/jail.d/wordpress-syslog.local ]; then
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/Jails/wordpress-syslog.jail -O /etc/fail2ban/jail.d/wordpress-syslog.local
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/wordpress-syslog.jail -O /etc/fail2ban/jail.d/wordpress-syslog.local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Setting Permsissions
|
#Setting Permsissions
|
||||||
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
||||||
|
|
||||||
#Makeing wordpress Finalize script and setting login Notice
|
#Makeing wordpress Finalize script and setting login Notice
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/wordpress/wordpress-init.sh -O ~/WordpressInit-"$sitename".sh
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/wordpress-init.sh -O ~/WordpressInit-"$sitename".sh
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' ~/WordpressInit-"$sitename".sh
|
sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' ~/WordpressInit-"$sitename".sh
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/wordpress/MotdWordpress -O /etc/update-motd.d/51-wpnotice
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/MotdWordpress -O /etc/update-motd.d/51-wpnotice
|
||||||
sed -i -e 's/SITEname/'$sitename'/' /etc/update-motd.d/51-wpnotice
|
sed -i -e 's/SITEname/'$sitename'/' /etc/update-motd.d/51-wpnotice
|
||||||
chmod +x /etc/update-motd.d/51-wpnotice
|
chmod +x /etc/update-motd.d/51-wpnotice
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#Configuring nginx
|
#Configuring nginx
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/wordpress/Nginx-unconfigured -O /tmp/nginx-siteconf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Nginx-unconfigured -O /tmp/nginx-siteconf
|
||||||
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf
|
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf
|
||||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext"
|
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext"
|
||||||
|
|
||||||
|
|||||||
@@ -4,19 +4,19 @@
|
|||||||
|
|
||||||
if [ $domainwww = 1 ]; then
|
if [ $domainwww = 1 ]; then
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/site-wwwredir >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-wwwredir >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||||
echo "" >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
echo "" >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/site_ssl-wwwredir >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-wwwredir >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||||
echo "" >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
echo "" >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_nossl.conf
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||||
ln -s /etc/apache2/sites-available/"$sitename"_nossl.conf /etc/apache2/sites-enabled/010-"$sitename".conf
|
ln -s /etc/apache2/sites-available/"$sitename"_nossl.conf /etc/apache2/sites-enabled/010-"$sitename".conf
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_ssl.conf
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||||
|
|
||||||
systemctl reload apache2
|
systemctl reload apache2
|
||||||
@@ -9,41 +9,41 @@ a2dismod mpm_prefork
|
|||||||
a2enmod actions fcgid alias proxy_fcgi ssl headers http2 setenvif socache_shmcb
|
a2enmod actions fcgid alias proxy_fcgi ssl headers http2 setenvif socache_shmcb
|
||||||
|
|
||||||
mkdir -p /etc/apache2/snippets/
|
mkdir -p /etc/apache2/snippets/
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/snippets-ssl.conf -O /etc/apache2/snippets/apa-ssl.conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/snippets-ssl.conf -O /etc/apache2/snippets/apa-ssl.conf
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/conf-custom.conf -O /etc/apache2/conf-enabled/zzz-custom.conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/conf-custom.conf -O /etc/apache2/conf-enabled/zzz-custom.conf
|
||||||
|
|
||||||
#Catch all (ip and unconfigured domains)
|
#Catch all (ip and unconfigured domains)
|
||||||
wget - -t7 "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/site_CatchAll -O /etc/apache2/sites-available/CatchAll.conf
|
wget - -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_CatchAll -O /etc/apache2/sites-available/CatchAll.conf
|
||||||
ln -s /etc/apache2/sites-available/CatchAll.conf /etc/apache2/sites-enabled/999-CatchAll.conf
|
ln -s /etc/apache2/sites-available/CatchAll.conf /etc/apache2/sites-enabled/999-CatchAll.conf
|
||||||
|
|
||||||
|
|
||||||
if [ $domainwww = 1 ]; then
|
if [ $domainwww = 1 ]; then
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/site-wwwredir >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-wwwredir >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||||
echo "" >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
echo "" >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/site_ssl-wwwredir >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-wwwredir >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||||
echo "" >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
echo "" >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||||
fi
|
fi
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_nossl.conf
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||||
ln -s /etc/apache2/sites-available/"$sitename"_nossl.conf /etc/apache2/sites-enabled/010-"$sitename".conf
|
ln -s /etc/apache2/sites-available/"$sitename"_nossl.conf /etc/apache2/sites-enabled/010-"$sitename".conf
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_ssl.conf
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||||
|
|
||||||
#non-ssl-Backend
|
#non-ssl-Backend
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/Backend_nossl.conf
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/Backend_nossl.conf
|
||||||
sed -i -e 's/DOMAINname/'$hostname'/' /etc/apache2/sites-available/Backend_nossl.conf
|
sed -i -e 's/DOMAINname/'$hostname'/' /etc/apache2/sites-available/Backend_nossl.conf
|
||||||
ln -s /etc/apache2/sites-available/Backend_nossl.conf /etc/apache2/sites-enabled/010-Backend.conf
|
ln -s /etc/apache2/sites-available/Backend_nossl.conf /etc/apache2/sites-enabled/010-Backend.conf
|
||||||
#ssl-Backend
|
#ssl-Backend
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/Backend_ssl.conf
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/Backend_ssl.conf
|
||||||
sed -i -e 's/DOMAINname/'$hostname'/' /etc/apache2/sites-available/Backend_ssl.conf
|
sed -i -e 's/DOMAINname/'$hostname'/' /etc/apache2/sites-available/Backend_ssl.conf
|
||||||
|
|
||||||
|
|
||||||
mkdir -p /opt/toggle
|
mkdir -p /opt/toggle
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/Scripts/toggles/toggle-PhpMyAdmin_APACHE.sh -O /opt/toggle/toggle-PhpMyAdmin.sh
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/Scripts/toggles/toggle-PhpMyAdmin_APACHE.sh -O /opt/toggle/toggle-PhpMyAdmin.sh
|
||||||
|
|
||||||
|
|
||||||
# custom Welcome page
|
# custom Welcome page
|
||||||
|
|||||||
@@ -30,18 +30,18 @@ echo "y" | ufw enable > $OUTPUT 2>&1
|
|||||||
##------------##
|
##------------##
|
||||||
|
|
||||||
#General config
|
#General config
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/jail.local -O /etc/fail2ban/jail.local
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/jail.local -O /etc/fail2ban/jail.local
|
||||||
|
|
||||||
#Custom Fiters
|
#Custom Fiters
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/Filters/nextcloud.filter -O /etc/fail2ban/filter.d/nextcloud.local
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Filters/nextcloud.filter -O /etc/fail2ban/filter.d/nextcloud.local
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/Filters/phpmyadmin-authlog.filter -O /etc/fail2ban/filter.d/phpmyadmin-authlog.local
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Filters/phpmyadmin-authlog.filter -O /etc/fail2ban/filter.d/phpmyadmin-authlog.local
|
||||||
wget -q -t7 https://plugins.svn.wordpress.org/wp-fail2ban/trunk/filters.d/wordpress-hard.conf -O /etc/fail2ban/filter.d/wordpress-hard.local
|
wget -q -t7 https://plugins.svn.wordpress.org/wp-fail2ban/trunk/filters.d/wordpress-hard.conf -O /etc/fail2ban/filter.d/wordpress-hard.local
|
||||||
wget -q -t7 https://plugins.svn.wordpress.org/wp-fail2ban/trunk/filters.d/wordpress-soft.conf -O /etc/fail2ban/filter.d/wordpress-soft.local
|
wget -q -t7 https://plugins.svn.wordpress.org/wp-fail2ban/trunk/filters.d/wordpress-soft.conf -O /etc/fail2ban/filter.d/wordpress-soft.local
|
||||||
|
|
||||||
#General jails
|
#General jails
|
||||||
rm /etc/fail2ban/jail.d/*
|
rm /etc/fail2ban/jail.d/*
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/Jails/sshd.jail -O /etc/fail2ban/jail.d/sshd.local
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/sshd.jail -O /etc/fail2ban/jail.d/sshd.local
|
||||||
if [ -z $disbackendcms ]; then
|
if [ -z $disbackendcms ]; then
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/Jails/phpmyadmin.jail -O /etc/fail2ban/jail.d/phpmyadmin.local
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/phpmyadmin.jail -O /etc/fail2ban/jail.d/phpmyadmin.local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -4,19 +4,19 @@
|
|||||||
|
|
||||||
if [ $domainwww = 1 ]; then
|
if [ $domainwww = 1 ]; then
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
echo "" >> /etc/nginx/sites-available/"$sitename"_nossl
|
echo "" >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
echo "" >> /etc/nginx/sites-available/"$sitename"_ssl
|
echo "" >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename"
|
ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename"
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
|
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
@@ -5,39 +5,39 @@ systemctl stop nginx
|
|||||||
#############
|
#############
|
||||||
|
|
||||||
mkdir -p /var/www/html /etc/nginx/sites-available /etc/nginx/sites-enabled /etc/nginx/snippets /etc/nginx/modules-available /etc/nginx/modules-enabled /etc/nginx/snippets/
|
mkdir -p /var/www/html /etc/nginx/sites-available /etc/nginx/sites-enabled /etc/nginx/snippets /etc/nginx/modules-available /etc/nginx/modules-enabled /etc/nginx/snippets/
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/fastcgi.conf -O /etc/nginx/fastcgi.conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/fastcgi.conf -O /etc/nginx/fastcgi.conf
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/fastcgi-php.conf -O /etc/nginx/snippets/fastcgi-php.conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/fastcgi-php.conf -O /etc/nginx/snippets/fastcgi-php.conf
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/snippets-ssl.conf -O /etc/nginx/snippets/ngx-ssl.conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/snippets-ssl.conf -O /etc/nginx/snippets/ngx-ssl.conf
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/nginx-default.conf -O /etc/nginx/nginx.conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/nginx-default.conf -O /etc/nginx/nginx.conf
|
||||||
|
|
||||||
if [ $domainwww = 1 ]; then
|
if [ $domainwww = 1 ]; then
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
echo "" >> /etc/nginx/sites-available/"$sitename"_nossl
|
echo "" >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
echo "" >> /etc/nginx/sites-available/"$sitename"_ssl
|
echo "" >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
fi
|
fi
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename"
|
ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename"
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
|
|
||||||
#Backend
|
#Backend
|
||||||
##non-ssl
|
##non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/Backend_nossl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/Backend_nossl
|
||||||
sed -i -e 's/DOMAINname/'$hostname'/' /etc/nginx/sites-available/Backend_nossl
|
sed -i -e 's/DOMAINname/'$hostname'/' /etc/nginx/sites-available/Backend_nossl
|
||||||
ln -s /etc/nginx/sites-available/Backend_nossl /etc/nginx/sites-enabled/Backend
|
ln -s /etc/nginx/sites-available/Backend_nossl /etc/nginx/sites-enabled/Backend
|
||||||
##ssl
|
##ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/Backend_ssl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/Backend_ssl
|
||||||
sed -i -e 's/DOMAINname/'$hostname'/' /etc/nginx/sites-available/Backend_ssl
|
sed -i -e 's/DOMAINname/'$hostname'/' /etc/nginx/sites-available/Backend_ssl
|
||||||
|
|
||||||
mkdir -p /opt/toggle
|
mkdir -p /opt/toggle
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/Scripts/toggles/toggle-Netdata_NGINX.sh -O /opt/toggle/toggle-Netdata.sh
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/Scripts/toggles/toggle-Netdata_NGINX.sh -O /opt/toggle/toggle-Netdata.sh
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/Scripts/toggles/toggle-PhpMyAdmin_NGINX.sh -O /opt/toggle/toggle-PhpMyAdmin.sh
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/Scripts/toggles/toggle-PhpMyAdmin_NGINX.sh -O /opt/toggle/toggle-PhpMyAdmin.sh
|
||||||
|
|
||||||
# custom Welcome page
|
# custom Welcome page
|
||||||
echo "<html><head></head><body>$webserv is functioning normally</body></html>" > /usr/share/nginx/html/index.html
|
echo "<html><head></head><body>$webserv is functioning normally</body></html>" > /usr/share/nginx/html/index.html
|
||||||
|
|||||||
@@ -4,19 +4,19 @@
|
|||||||
|
|
||||||
if [ $domainwww = 1 ]; then
|
if [ $domainwww = 1 ]; then
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
echo "" >> /etc/nginx/sites-available/"$sitename"_nossl
|
echo "" >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
echo "" >> /etc/nginx/sites-available/"$sitename"_ssl
|
echo "" >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename"
|
ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename"
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
|
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
@@ -5,24 +5,24 @@ systemctl stop nginx
|
|||||||
#############
|
#############
|
||||||
|
|
||||||
mkdir -p /var/www/html /etc/nginx/sites-available /etc/nginx/sites-enabled /etc/nginx/snippets /etc/nginx/modules-available /etc/nginx/modules-enabled /etc/nginx/snippets/
|
mkdir -p /var/www/html /etc/nginx/sites-available /etc/nginx/sites-enabled /etc/nginx/snippets /etc/nginx/modules-available /etc/nginx/modules-enabled /etc/nginx/snippets/
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/fastcgi.conf -O /etc/nginx/fastcgi.conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/fastcgi.conf -O /etc/nginx/fastcgi.conf
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/snippets-ssl.conf -O /etc/nginx/snippets/ngx-ssl.conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/snippets-ssl.conf -O /etc/nginx/snippets/ngx-ssl.conf
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/nginx-default.conf -O /etc/nginx/nginx.conf
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/nginx-default.conf -O /etc/nginx/nginx.conf
|
||||||
|
|
||||||
if [ $domainwww = 1 ]; then
|
if [ $domainwww = 1 ]; then
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
echo "" >> /etc/nginx/sites-available/"$sitename"_nossl
|
echo "" >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
echo "" >> /etc/nginx/sites-available/"$sitename"_ssl
|
echo "" >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
fi
|
fi
|
||||||
#non-ssl
|
#non-ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl
|
||||||
ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename"
|
ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename"
|
||||||
#ssl
|
#ssl
|
||||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl
|
wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl
|
sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl
|
||||||
|
|
||||||
# custom Welcome page
|
# custom Welcome page
|
||||||
|
|||||||
@@ -86,6 +86,6 @@ systemctl reload php$newphpver-fpm
|
|||||||
|
|
||||||
sed -i "/phpver/c\phpver=\"$newphpver\"" /etc/ICTM/mainvar.list
|
sed -i "/phpver/c\phpver=\"$newphpver\"" /etc/ICTM/mainvar.list
|
||||||
|
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/phpupdate-handeler.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/phpupdate-handeler.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/phpupdate-handeler.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/phpupdate-handeler.sh)
|
||||||
fi
|
fi
|
||||||
@@ -34,7 +34,7 @@ fi
|
|||||||
|
|
||||||
#Restoring config
|
#Restoring config
|
||||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e "/#ConfHere1/ r /tmp/"$sitename"-config" -e '/#ConfHere/c\' /etc/"$webservice"/sites-available/"$sitename"_ssl"$ext"
|
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e "/#ConfHere1/ r /tmp/"$sitename"-config" -e '/#ConfHere/c\' /etc/"$webservice"/sites-available/"$sitename"_ssl"$ext"
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/ssl-handler.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/ssl-handler.sh)
|
||||||
|
|
||||||
#Remove script
|
#Remove script
|
||||||
while true; do
|
while true; do
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ branch=master
|
|||||||
|
|
||||||
###Select Module type
|
###Select Module type
|
||||||
##Uncomment for CoreModules
|
##Uncomment for CoreModules
|
||||||
mtype=""$repo"/raw/branch/"$branch"/CoreModules/"$SMI_ModuleName""
|
mtype=""$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$SMI_ModuleName""
|
||||||
##Uncomment for SubModules
|
##Uncomment for SubModules
|
||||||
#mtype=""$repo"/raw/branch/"$branch"/SubModules/"$SMI_ModuleName""
|
#mtype=""$repo"/raw/"$branchtype"/"$branch"/SubModules/"$SMI_ModuleName""
|
||||||
##Uncomment for CMS
|
##Uncomment for CMS
|
||||||
#mtype=""$repo"/raw/branch/"$branch"/CMS/"$SMI_ModuleName""
|
#mtype=""$repo"/raw/"$branchtype"/"$branch"/CMS/"$SMI_ModuleName""
|
||||||
##Uncomment for External Module
|
##Uncomment for External Module
|
||||||
#mtype=""$repo"/raw/branch/"$branch""
|
#mtype=""$repo"/raw/"$branchtype"/"$branch""
|
||||||
|
|
||||||
#SelfBuilding Vars
|
#SelfBuilding Vars
|
||||||
PKGI="${PKGM} install -y"
|
PKGI="${PKGM} install -y"
|
||||||
|
|||||||
95
installer.sh
95
installer.sh
@@ -25,6 +25,7 @@ fi
|
|||||||
#Git-repo
|
#Git-repo
|
||||||
repo=https://git.ictmaatwerk.com/bprieshof/UBU-Web-V2
|
repo=https://git.ictmaatwerk.com/bprieshof/UBU-Web-V2
|
||||||
branch=master
|
branch=master
|
||||||
|
branchtype=branch #=branch for branch and =tag for release
|
||||||
#Installer-config
|
#Installer-config
|
||||||
phpver=7.4
|
phpver=7.4
|
||||||
PHPMyadmin=1 #Overwriten by cms's without php
|
PHPMyadmin=1 #Overwriten by cms's without php
|
||||||
@@ -181,7 +182,7 @@ $PKGI curl > $OUTPUT 2>&1
|
|||||||
##--------##
|
##--------##
|
||||||
|
|
||||||
#Fetching Menu Entries
|
#Fetching Menu Entries
|
||||||
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)
|
||||||
|
|
||||||
if [ $IMODE = n ]; then
|
if [ $IMODE = n ]; then
|
||||||
if [ $TestMode = 0 ]; then
|
if [ $TestMode = 0 ]; then
|
||||||
@@ -297,10 +298,10 @@ declare -n CMSL="$webserv"CMSL
|
|||||||
declare -n options="$webserv"Options
|
declare -n options="$webserv"Options
|
||||||
|
|
||||||
#Generating APT-List for webserver
|
#Generating APT-List for webserver
|
||||||
curl --silent --show-error "$repo"/raw/branch/"$branch"/CoreModules/generic/apt.list >>/tmp/apt.list
|
curl --silent --show-error "$repo"/raw/"$branchtype"/"$branch"/CoreModules/generic/apt.list >>/tmp/apt.list
|
||||||
printf " " >>/tmp/apt.list
|
printf " " >>/tmp/apt.list
|
||||||
|
|
||||||
curl --silent --show-error "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/apt.list >>/tmp/apt.list
|
curl --silent --show-error "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/apt.list >>/tmp/apt.list
|
||||||
printf " " >>/tmp/apt.list
|
printf " " >>/tmp/apt.list
|
||||||
|
|
||||||
|
|
||||||
@@ -310,7 +311,7 @@ printf " " >>/tmp/apt.list
|
|||||||
|
|
||||||
mkdir -p /etc/ICTM/sites
|
mkdir -p /etc/ICTM/sites
|
||||||
echo "InstDate=$(date "+%d-%B-%Y")" >> /etc/ICTM/mainvar.list
|
echo "InstDate=$(date "+%d-%B-%Y")" >> /etc/ICTM/mainvar.list
|
||||||
for storeme in PKGM PKGA PKGI OUTPUT IMODE repo branch webserv phpver sqlver PHPMyadmin email hostname; do
|
for storeme in PKGM PKGA PKGI OUTPUT IMODE repo branch branchtype webserv phpver sqlver PHPMyadmin email hostname; do
|
||||||
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list
|
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -372,8 +373,8 @@ echo 'SelectedOptions=('$option')' > /etc/ICTM/selopts.list
|
|||||||
option="${option,,}" && option="${option// /}" && option="${option//:/ }" && option="${option//'"'}"
|
option="${option,,}" && option="${option// /}" && option="${option//:/ }" && option="${option//'"'}"
|
||||||
|
|
||||||
#enableing modules wanted by webserver
|
#enableing modules wanted by webserver
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/reqmodules.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/reqmodules.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/reqmodules.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/reqmodules.sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Combining selected option with always-on options
|
#Combining selected option with always-on options
|
||||||
@@ -381,17 +382,17 @@ option="$option""$aonoption"
|
|||||||
|
|
||||||
#Generating APT-list options
|
#Generating APT-list options
|
||||||
for val1 in ${option[*]}; do
|
for val1 in ${option[*]}; do
|
||||||
modListed=$(wget -t7 -qO - "$repo"/raw/branch/master/extModules.list|grep "$val1")
|
modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1")
|
||||||
#Checking
|
#Checking
|
||||||
if test -z "$modListed"
|
if test -z "$modListed"
|
||||||
then
|
then
|
||||||
#Fetching from local repo
|
#Fetching from local repo
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/apt.list; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/apt.list; then
|
||||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/apt.list >>/tmp/apt.list
|
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/apt.list >>/tmp/apt.list
|
||||||
printf " " >>/tmp/apt.list
|
printf " " >>/tmp/apt.list
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-apt.list; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$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
|
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/"$webserv"-apt.list >>/tmp/apt.list
|
||||||
printf " " >>/tmp/apt.list
|
printf " " >>/tmp/apt.list
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -433,12 +434,12 @@ fi
|
|||||||
CMS="${CMS//:}" && CMS="${CMS,,}"
|
CMS="${CMS//:}" && CMS="${CMS,,}"
|
||||||
|
|
||||||
#Generating APT-List 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
|
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/branch/"$branch"/CMS/"$CMS"/apt.list >>/tmp/apt.list
|
curl "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/apt.list >>/tmp/apt.list
|
||||||
printf " " >>/tmp/apt.list
|
printf " " >>/tmp/apt.list
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-apt.list; then
|
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/branch/"$branch"/CMS/"$CMS"/"$webserv"-apt.list >>/tmp/apt.list
|
curl "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-apt.list >>/tmp/apt.list
|
||||||
printf " " >>/tmp/apt.list
|
printf " " >>/tmp/apt.list
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@@ -451,26 +452,26 @@ fi
|
|||||||
msg " Pre-configuring"
|
msg " Pre-configuring"
|
||||||
|
|
||||||
#Generic Pre-Conf
|
#Generic Pre-Conf
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/generic/preconf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/generic/preconf.sh)
|
||||||
|
|
||||||
#Generic WebServer
|
#Generic WebServer
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/preconf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/preconf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/preconf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/preconf.sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Preconfiguring for Modules
|
#Preconfiguring for Modules
|
||||||
for val1 in ${option[*]}; do
|
for val1 in ${option[*]}; do
|
||||||
msg "Pre-configuring $val1"
|
msg "Pre-configuring $val1"
|
||||||
modListed=$(wget -t7 -qO - "$repo"/raw/branch/master/extModules.list|grep "$val1")
|
modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1")
|
||||||
#Checking
|
#Checking
|
||||||
if test -z "$modListed"
|
if test -z "$modListed"
|
||||||
then
|
then
|
||||||
#Fetching from local repo
|
#Fetching from local repo
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/preconf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/preconf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/preconf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/preconf.sh)
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/"$webserv"-preconf.sh)
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
#Fetching from remote repo
|
#Fetching from remote repo
|
||||||
@@ -484,11 +485,11 @@ for val1 in ${option[*]}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
#Preconfiguring CMS
|
#Preconfiguring CMS
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/preconf.sh; then
|
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/branch/"$branch"/CMS/"$CMS"/preconf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/preconf.sh)
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh; then
|
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/branch/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -507,26 +508,26 @@ cat /tmp/apt.list | xargs $PKGI
|
|||||||
msg " Configuring"
|
msg " Configuring"
|
||||||
|
|
||||||
#Configuring Generic
|
#Configuring Generic
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/generic/conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/generic/conf.sh)
|
||||||
|
|
||||||
#Configuring WebServer
|
#Configuring WebServer
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/conf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/conf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/conf.sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Configuring Options
|
#Configuring Options
|
||||||
for val1 in ${option[*]}; do
|
for val1 in ${option[*]}; do
|
||||||
msg " Configuring $val1"
|
msg " Configuring $val1"
|
||||||
modListed=$(wget -t7 -qO - "$repo"/raw/branch/master/extModules.list|grep "$val1")
|
modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1")
|
||||||
#Checking
|
#Checking
|
||||||
if test -z "$modListed"
|
if test -z "$modListed"
|
||||||
then
|
then
|
||||||
#Fetching from local repo
|
#Fetching from local repo
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/conf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/conf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/conf.sh)
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/"$val1"/"$webserv"-conf.sh)
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
#Fetching from remote repo
|
#Fetching from remote repo
|
||||||
@@ -554,35 +555,35 @@ if [ $sslenable = 1 ]; then
|
|||||||
certbot --"$certwebserv" certonly -n -d "$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos
|
certbot --"$certwebserv" certonly -n -d "$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos
|
||||||
fi
|
fi
|
||||||
certbot --"$certwebserv" certonly -n -d "$hostname" -m "$email" --hsts --redirect --no-eff-email --agree-tos
|
certbot --"$certwebserv" certonly -n -d "$hostname" -m "$email" --hsts --redirect --no-eff-email --agree-tos
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/ssl-handler.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/ssl-handler.sh; then
|
||||||
sslfr=1 source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/ssl-handler.sh)
|
sslfr=1 source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/ssl-handler.sh)
|
||||||
fi
|
fi
|
||||||
elif [ $sslenable = 0 ]; then
|
elif [ $sslenable = 0 ]; then
|
||||||
site_ext=nossl
|
site_ext=nossl
|
||||||
fi
|
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
|
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
|
||||||
|
|
||||||
if [ -z $disbackendcms ]; then
|
if [ -z $disbackendcms ]; then
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/Scripts/EnableSSL.sh -O ~/activateSSL-Backend.sh
|
wget -q -t7 "$repo"/raw/"$branchtype"/"$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
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg " Configuring CMS"
|
msg " Configuring CMS"
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/conf.sh; then
|
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/branch/"$branch"/CMS/"$CMS"/conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/conf.sh)
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/"$CMS"/"$webserv"-conf.sh; then
|
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/branch/"$branch"/CMS/"$CMS"/"$webserv"-conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-conf.sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $disbackendcms ]; then
|
if [ -z $disbackendcms ]; then
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/Backend/conf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/conf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CMS/Backend/conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/conf.sh)
|
||||||
fi
|
fi
|
||||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/branch/"$branch"/CMS/Backend/"$webserv"-conf.sh; then
|
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/"$webserv"-conf.sh; then
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CMS/Backend/"$webserv"-conf.sh)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/"$webserv"-conf.sh)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user