Skip to content

Commit

Permalink
Fix issue #6
Browse files Browse the repository at this point in the history
  • Loading branch information
joglomedia committed Aug 14, 2019
1 parent 3833a36 commit 72d7371
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 36 deletions.
8 changes: 0 additions & 8 deletions etc/php/5.6/fpm/php-fpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,3 @@ error_log = /var/log/php5.6-fpm.log
; - /usr otherwise
include=/etc/php/5.6/fpm/pool.d/*.conf

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Custom Optimization for LEMPer ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Adjust here to meet your needs.
emergency_restart_threshold 10
emergency_restart_interval 1m
process_control_timeout 10s
9 changes: 0 additions & 9 deletions etc/php/7.0/fpm/php-fpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,3 @@ error_log = /var/log/php7.0-fpm.log
; - the global prefix if it's been set (-p argument)
; - /usr otherwise
include=/etc/php/7.0/fpm/pool.d/*.conf

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Custom Optimization for LEMPer ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Adjust here to meet your needs.
emergency_restart_threshold 10
emergency_restart_interval 1m
process_control_timeout 10s
9 changes: 0 additions & 9 deletions etc/php/7.1/fpm/php-fpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,3 @@ error_log = /var/log/php7.1-fpm.log
; - the global prefix if it's been set (-p argument)
; - /usr otherwise
include=/etc/php/7.1/fpm/pool.d/*.conf

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Custom Optimization for LEMPer ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Adjust here to meet your needs.
emergency_restart_threshold 10
emergency_restart_interval 1m
process_control_timeout 10s
31 changes: 21 additions & 10 deletions scripts/install_php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -362,18 +362,29 @@ EOL
run mv "/etc/php/${PHPv}/fpm/php-fpm.conf" "/etc/php/${PHPv}/fpm/php-fpm.conf.old"
run cp -f "etc/php/${PHPv}/fpm/php-fpm.conf" "/etc/php/${PHPv}/fpm/"
else
cat >> "/etc/php/${PHPv}/fpm/php-fpm.conf" <<EOL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Custom Optimization for LEMPer ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if grep -qwE "^emergency_restart_threshold\ =\ [0-9]*" /etc/php/${PHPv}/fpm/php-fpm.conf; then
run sed -i "s/^emergency_restart_threshold\ =\ [0-9]*/emergency_restart_threshold\ =\ 10/g" \
/etc/php/${PHPv}/fpm/php-fpm.conf
else
run sed -i "/^;emergency_restart_threshold/a emergency_restart_threshold\ =\ 10" \
/etc/php/${PHPv}/fpm/php-fpm.conf
fi

; Adjust here to meet your needs.
emergency_restart_threshold 10
emergency_restart_interval 1m
process_control_timeout 10s
if grep -qwE "^emergency_restart_interval\ =\ [0-9]*" /etc/php/${PHPv}/fpm/php-fpm.conf; then
run sed -i "s/^emergency_restart_interval\ =\ [0-9]*/emergency_restart_interval\ =\ 60/g" \
/etc/php/${PHPv}/fpm/php-fpm.conf
else
run sed -i "/^;emergency_restart_interval/a emergency_restart_interval\ =\ 60" \
/etc/php/${PHPv}/fpm/php-fpm.conf
fi

EOL
if grep -qwE "^process_control_timeout\ =\ [0-9]*" /etc/php/${PHPv}/fpm/php-fpm.conf; then
run sed -i "s/^process_control_timeout\ =\ [0-9]*/process_control_timeout\ =\ 10/g" \
/etc/php/${PHPv}/fpm/php-fpm.conf
else
run sed -i "/^;process_control_timeout/a process_control_timeout\ =\ 10" \
/etc/php/${PHPv}/fpm/php-fpm.conf
fi
fi

if [ ! -d "/etc/php/${PHPv}/fpm/pool.d" ]; then
Expand Down

0 comments on commit 72d7371

Please sign in to comment.