From 9b3069a1eacd3cbda0bfe565925e80f667f6c96d Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Wed, 23 Apr 2014 11:22:01 -0400
Subject: [PATCH] Merge remote-tracking branch 'origin/stable-3.0.5'
---
server/mods-available/web_module.inc.php | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php
index 680b592..c31aa67 100644
--- a/server/mods-available/web_module.inc.php
+++ b/server/mods-available/web_module.inc.php
@@ -235,6 +235,18 @@
} else {
$path_parts = pathinfo($init_script);
$initcommand = $app->system->getinitcommand($path_parts['basename'], $action, $path_parts['dirname']);
+
+ if($action == 'reload' && $init_script == $conf['init_scripts'].'/'.$web_config['php_fpm_init_script']) {
+ // we have to do a workaround because of buggy ubuntu fpm reload handling
+ // @see: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1242376
+ if(file_exists('/etc/os-release')) {
+ $tmp = file_get_contents('/etc/os-release');
+ if(preg_match('/^ID=ubuntu/m', $tmp) && preg_match('/^VERSION_ID="14\.04"/m', $tmp)) {
+ $initcommand = '/sbin/start-stop-daemon --stop --signal USR2 --quiet --pidfile /var/run/php5-fpm.pid --name php5-fpm';
+ }
+ unset($tmp);
+ }
+ }
}
$retval = array('output' => '', 'retval' => 0);
--
Gitblit v1.9.1