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
12 lines
460 B
Bash
12 lines
460 B
Bash
#Do not generate php pool when php is not installed
|
|
if [ $webserv != nginx_nonphp ]; then
|
|
|
|
#Setup PHP Pool
|
|
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Fpm-Pool.conf-unconfigured -o "$phpPoolDir"/"$sitename".conf
|
|
sed -i -e 's/PHPver/'$phpver'/g' -e 's/SITEname/'$sitename'/g' -e 's/DOMAINname/'$domain'/' "$phpPoolDir"/$sitename.conf
|
|
groupadd "$sitename"
|
|
useradd -g "$sitename" "$sitename"
|
|
|
|
systemctl reload $phpFPMService
|
|
|
|
fi |