Added rough versioning system

This commit is contained in:
2021-02-25 11:34:42 +01:00
parent 638a8c1525
commit 1423d72e53
4 changed files with 28 additions and 1 deletions

View File

@@ -6,6 +6,7 @@
###############################
itype=AddCMS
ScriptCompat=2
##-----------------##
# 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/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 [ $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

View File

@@ -6,6 +6,7 @@
###############################
itype=AddMod
ScriptCompat=2
##-----------------##
# 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/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 [ $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

View 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

View File

@@ -32,6 +32,7 @@ fi
repo=https://git.ictmaatwerk.com/VPS-scripts/Web-V2
branch=PostfixTesting
branchtype=branch #=branch for branch and =tag for release
CompatVer=2
#Installer-config
phpver=7.4
PHPMyadmin=1 #Overwriten by cms's without php
@@ -374,7 +375,7 @@ fi
mkdir -p /etc/ICTM/sites
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
done