Replaced references php With vars
Done because differences between distros is quite big, and this was the beter solution then using alot of if statements List of changes: * Replaced service names php"$phpver"-fpm with $phpFPMService * Replaced PHPver in package list with phpPkgName * Replaced full php config path with $phpMainConf * Replaced php pool path with $phpPoolDir
This commit is contained in:
21
Scripts/GeneratePhplist.sh
Normal file
21
Scripts/GeneratePhplist.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
if [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
|
||||
|
||||
if [ "$shortdist" = "ubu1804" ] || [ "$osrel" = "ubu2004" ] || [ "$osrel" = "deb10" ] ; then
|
||||
# Debian/Ubunbtu Php variables
|
||||
phpPoolDir=/etc/php/${phpver}/fpm/pool.d
|
||||
phpPkgName=php${phpver}
|
||||
phpMainConf=/etc/php/${phpver}/fpm/php.ini
|
||||
phpFPMService=php${phpver}-fpm
|
||||
|
||||
elif [ "$shortdist" = "cent8" ]; then
|
||||
# Centos Php variable
|
||||
phpPoolDir=/etc/opt/remi/php${phpver//.}/php-fpm.d/
|
||||
phpPkgName=php${phpver//.}-php
|
||||
phpMainConf=/etc/opt/remi/php${phpver//.}/php.ini
|
||||
phpFPMService=php${phpver//.}-php-fpm
|
||||
fi
|
||||
|
||||
#Storing vars to config
|
||||
for storeme in phpPoolDir phpPkgName phpMainConf phpFPMService; do
|
||||
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/phpvar.list
|
||||
done
|
||||
Reference in New Issue
Block a user