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:
22
SubModules/php-fpm/preconf.sh
Normal file
22
SubModules/php-fpm/preconf.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
#Creating Socket directory
|
||||
mkdir -p /var/run/php
|
||||
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