Skip to content

Commit 1050bda

Browse files
author
Marius Cramer
committed
- implemented fix for Ubuntu 14.04 with fpm pool reload handling
1 parent 96f69dc commit 1050bda

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

server/mods-available/web_module.inc.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,17 @@ function restartPHP_FPM($action = 'restart') {
235235
} else {
236236
$path_parts = pathinfo($init_script);
237237
$initcommand = $app->system->getinitcommand($path_parts['basename'], $action, $path_parts['dirname']);
238+
239+
if($action == 'reload') {
240+
if(file_exists('/etc/os-release')) {
241+
$tmp = file_get_contents('/etc/os-release');
242+
if(preg_match('/^ID=ubuntu/m', $tmp) && preg_match('/^VERSION_ID="14\.04"/m', $tmp)) {
243+
$initcommand = '/sbin/start-stop-daemon --stop --signal USR2 --quiet --pidfile /var/run/php5-fpm.pid --name php5-fpm';
244+
}
245+
unset($tmp);
246+
}
247+
}
248+
238249
}
239250

240251
$retval = array('output' => '', 'retval' => 0);

0 commit comments

Comments
 (0)