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:
@@ -1,18 +1,18 @@
|
||||
systemctl stop php${phpver}-fpm
|
||||
systemctl stop $phpFPMService
|
||||
###############
|
||||
# PHP-FPM #
|
||||
###############
|
||||
|
||||
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php/"$phpver"/fpm/php.ini
|
||||
sed -i 's/;opcache.memory_consumption=128/opcache.memory_consumption=256/g' /etc/php/"$phpver"/fpm/php.ini
|
||||
sed -i 's/;opcache.enable=1/opcache.enable=1/g' /etc/php/"$phpver"/fpm/php.ini
|
||||
sed -i 's/;opcache.interned_strings_buffer=8/opcache.interned_strings_buffer=8/g' /etc/php/"$phpver"/fpm/php.ini
|
||||
sed -i 's/;opcache.max_accelerated_files=10000/opcache.max_accelerated_files=50000/g' /etc/php/"$phpver"/fpm/php.ini
|
||||
sed -i 's/;opcache.max_wasted_percentage=5/opcache.max_wasted_percentage=5/g' /etc/php/"$phpver"/fpm/php.ini
|
||||
sed -i 's/;opcache.revalidate_freq=2/opcache.revalidate_freq=0/g' /etc/php/"$phpver"/fpm/php.ini
|
||||
sed -i 's/; max_input_vars = 1000/max_input_vars = 10000/g' /etc/php/"$phpver"/fpm/php.ini
|
||||
sed -i 's/upload_max_filesize = 2/upload_max_filesize = 128/g' /etc/php/"$phpver"/fpm/php.ini
|
||||
sed -i 's/post_max_size = 8/post_max_size = 64/g' /etc/php/"$phpver"/fpm/php.ini
|
||||
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' "$phpMainConf"
|
||||
sed -i 's/;opcache.memory_consumption=128/opcache.memory_consumption=256/g' "$phpMainConf"
|
||||
sed -i 's/;opcache.enable=1/opcache.enable=1/g' "$phpMainConf"
|
||||
sed -i 's/;opcache.interned_strings_buffer=8/opcache.interned_strings_buffer=8/g' "$phpMainConf"
|
||||
sed -i 's/;opcache.max_accelerated_files=10000/opcache.max_accelerated_files=50000/g' "$phpMainConf"
|
||||
sed -i 's/;opcache.max_wasted_percentage=5/opcache.max_wasted_percentage=5/g' "$phpMainConf"
|
||||
sed -i 's/;opcache.revalidate_freq=2/opcache.revalidate_freq=0/g' "$phpMainConf"
|
||||
sed -i 's/; max_input_vars = 1000/max_input_vars = 10000/g' "$phpMainConf"
|
||||
sed -i 's/upload_max_filesize = 2/upload_max_filesize = 128/g' "$phpMainConf"
|
||||
sed -i 's/post_max_size = 8/post_max_size = 64/g' "$phpMainConf"
|
||||
|
||||
systemctl start php${phpver}-fpm
|
||||
systemctl enable php${phpver}-fpm
|
||||
systemctl start $phpFPMService
|
||||
systemctl enable $phpFPMService
|
||||
Reference in New Issue
Block a user