Skip to content

Commit 61d3198

Browse files
authored
restart the webservers services one time...
...no matter the outcome of `calculate_php_fpm()` Fix for #943 943
1 parent 6d405de commit 61d3198

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ If you think this is a bug, please report it to $ISSUES"
332332
exit 1
333333
else
334334
check_command sed -i "s|pm.max_children.*|pm.max_children = $PHP_FPM_MAX_CHILDREN|g" $PHP_POOL_DIR/nextcloud.conf
335-
restart_webserver
336335
print_text_in_color "$IGreen" "pm.max_children was set to $PHP_FPM_MAX_CHILDREN"
337336
# Check if the sum of all the current values are more than $PHP_FPM_MAX_CHILDREN and only continue it is
338337
if [ $PHP_FPM_MAX_CHILDREN -gt $CURRENT_SUM ]
@@ -343,7 +342,6 @@ else
343342
if [ "$(grep pm.start_servers $PHP_POOL_DIR/nextcloud.conf | awk '{ print $3}')" -lt $min_start_servers ]
344343
then
345344
check_command sed -i "s|pm.max_spare_servers.*|pm.max_spare_servers = $((PHP_FPM_MAX_CHILDREN - 30))|g" $PHP_POOL_DIR/nextcloud.conf
346-
restart_webserver
347345
print_text_in_color "$IGreen" "pm.max_spare_servers was set to $((PHP_FPM_MAX_CHILDREN - 30))"
348346
fi
349347
fi
@@ -359,8 +357,8 @@ then
359357
check_command sed -i "s|pm.max_spare_servers.*|pm.max_spare_servers = 3|g" $PHP_POOL_DIR/nextcloud.conf
360358
print_text_in_color "$ICyan" "All PHP-INI values were set back to default values as the value for pm.max_children ($PHP_FPM_MAX_CHILDREN) was lower than the sum of all the current values ($CURRENT_SUM)"
361359
print_text_in_color "$ICyan" "Please run this again to set optimal values"
362-
restart_webserver
363360
fi
361+
restart_webserver
364362
}
365363

366364
test_connection() {

0 commit comments

Comments
 (0)