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:
@@ -33,12 +33,12 @@ printf '%s\n' "$WPSalts" >> /var/www/"$domain"/html/wp-config.php
|
||||
printf '%s\n' "require_once(ABSPATH . 'wp-settings.php');" >> /var/www/"$domain"/html/wp-config.php
|
||||
|
||||
#PHP Pool
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Fpm-Pool.conf-unconfigured -o /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf
|
||||
sed -i -e 's/PHPver/'$phpver'/g' -e 's/SITEname/'$sitename'/g' -e 's/DOMAINname/'$domain'/g' /etc/php/"$phpver"/fpm/pool.d/$sitename.conf
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Fpm-Pool.conf-unconfigured -o "$phpPoolDir"/"$sitename".conf
|
||||
sed -i -e 's/PHPver/'$phpver'/g' -e 's/SITEname/'$sitename'/g' -e 's/DOMAINname/'$domain'/g' "$phpPoolDir"/$sitename.conf
|
||||
groupadd "$sitename"
|
||||
useradd -g "$sitename" "$sitename"
|
||||
|
||||
systemctl reload php"$phpver"-fpm
|
||||
systemctl reload $phpFPMService
|
||||
|
||||
#fail2ban
|
||||
if [ ! -f /etc/fail2ban/jail.d/wordpress-syslog.local ]; then
|
||||
|
||||
Reference in New Issue
Block a user