Added rough versioning system
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
###############################
|
###############################
|
||||||
|
|
||||||
itype=AddCMS
|
itype=AddCMS
|
||||||
|
ScriptCompat=2
|
||||||
|
|
||||||
##-----------------##
|
##-----------------##
|
||||||
# Fetching Vars #
|
# Fetching Vars #
|
||||||
@@ -15,6 +16,8 @@ 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
|
||||||
|
if [ "$CompatVer" -lt "$ScriptCompat" ]; then echo "Web-V2 is outdated, Please run the Compat-V*.sh updater from the repo, Current version= $CompatVer" && exit ; fi
|
||||||
|
|
||||||
if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi
|
if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi
|
||||||
if [ $webserv != nginx_nonphp ]; then
|
if [ $webserv != nginx_nonphp ]; then
|
||||||
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi
|
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
###############################
|
###############################
|
||||||
|
|
||||||
itype=AddMod
|
itype=AddMod
|
||||||
|
ScriptCompat=2
|
||||||
|
|
||||||
##-----------------##
|
##-----------------##
|
||||||
# Fetching Vars #
|
# Fetching Vars #
|
||||||
@@ -15,6 +16,8 @@ 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
|
||||||
|
if [ "$CompatVer" -lt "$ScriptCompat" ]; then echo "Web-V2 is outdated, Please run the Compat-V*.sh updater from the repo, Current version= $CompatVer" && exit ; fi
|
||||||
|
|
||||||
if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi
|
if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi
|
||||||
if [ $webserv != nginx_nonphp ]; then
|
if [ $webserv != nginx_nonphp ]; then
|
||||||
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi
|
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi
|
||||||
|
|||||||
20
Scripts/Compat/Compat-V2.sh
Normal file
20
Scripts/Compat/Compat-V2.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
|
||||||
|
|
||||||
|
source /etc/ICTM/selopts.list
|
||||||
|
source /etc/ICTM/mainvar.list
|
||||||
|
|
||||||
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list)
|
||||||
|
|
||||||
|
#Setting Menulist to webserver
|
||||||
|
declare -n CMSL="$webserv"CMSL
|
||||||
|
declare -n options="$webserv"Options
|
||||||
|
|
||||||
|
#Updating mod lists
|
||||||
|
option=$(whiptail --nocancel --title "Additional modules" --checklist "Please select enabled features" 11 74 5 "${options[@]}" 3>&1 1>&2 2>&3)
|
||||||
|
aonoption="/MySQL/"
|
||||||
|
aonoption="$aonoption /Unattended-Security-Updates/"
|
||||||
|
aonoption="$aonoption /Backup-Util/"
|
||||||
|
aonoption="$aonoption /AcmeSH/"
|
||||||
|
echo 'SelectedOptions=('$option')' > /etc/ICTM/selopts.list
|
||||||
|
echo 'EnabledAons=('$aonoption')' >> /etc/ICTM/selopts.list
|
||||||
|
declare -p CompatVer | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list
|
||||||
@@ -32,6 +32,7 @@ fi
|
|||||||
repo=https://git.ictmaatwerk.com/VPS-scripts/Web-V2
|
repo=https://git.ictmaatwerk.com/VPS-scripts/Web-V2
|
||||||
branch=PostfixTesting
|
branch=PostfixTesting
|
||||||
branchtype=branch #=branch for branch and =tag for release
|
branchtype=branch #=branch for branch and =tag for release
|
||||||
|
CompatVer=2
|
||||||
#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
|
||||||
@@ -374,7 +375,7 @@ fi
|
|||||||
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 PKGI PKGUC PKGUP PKGLIST OUTPUT IMODE shortdist repo branch branchtype webserv email shortdist hostname; do
|
for storeme in PKGM PKGI PKGUC PKGUP PKGLIST OUTPUT IMODE shortdist repo branch branchtype webserv email shortdist hostname CompatVer; 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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user