Main: Updated way DB names are generated

Switch from geting folder count in /var/www
to using SiteCount variable stored in /etc/ICTM/sites.count,
installer.sh has static 1, AppendCMS gets the file an increments it by one.
Fallback is build in for systems without sites.count
This commit is contained in:
2022-04-21 15:17:28 +02:00
parent 9222904ab2
commit be98df66a9
5 changed files with 14 additions and 10 deletions

View File

@@ -37,6 +37,7 @@ CompatVer=2
phpver=7.4
PHPMyadmin=1 #Overwriten by cms's without php
sqlver=8.0
SiteCount=1
TestMode=0
#PackageManager-config
@@ -386,8 +387,8 @@ for storeme in PKGM PKGI PKGUC PKGUP PKGLIST OUTPUT IMODE shortdist repo branch
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list
done
touch /etc/ICTM/sites/"$sitename"
echo "SiteCount=$SiteCount" > /etc/ICTM/sites.count
##----------##
# Addons #