From ebd0e986ed11f2a34fb58cdd33efbfab192083ad Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Fri, 22 Apr 2016 05:26:17 -0400 Subject: [PATCH] Added PHP 7 check in installer and updater. --- server/mods-available/rescue_core_module.inc.php | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/server/mods-available/rescue_core_module.inc.php b/server/mods-available/rescue_core_module.inc.php index a3a5ad7..2f905d9 100644 --- a/server/mods-available/rescue_core_module.inc.php +++ b/server/mods-available/rescue_core_module.inc.php @@ -272,6 +272,17 @@ /* Set the new try counter */ $this->_rescueData['webserver']['try_counter'] = $tryCount; + + if ($tryCount > 2 && $conf['serverconfig']['web']['server_type'] != 'nginx') { + if($app->system->is_user('apache')) { + $app->log("Clearing semaphores table for user apache.",LOGLEVEL_WARN); + exec("ipcs -s | grep apache | awk '{ print $2 }' | xargs ipcrm sem"); + } + if($app->system->is_user('www-data')) { + $app->log("Clearing semaphores table for user apache.",LOGLEVEL_WARN); + exec("ipcs -s | grep www-data | awk '{ print $2 }' | xargs ipcrm sem"); + } + } /* if 5 times will not work, we have to give up... */ if ($tryCount > 5){ @@ -371,7 +382,7 @@ * @param type $daemon the name of the daemon */ private function _rescueDaemon($daemon){ - global $conf; + global $conf, $app; $app->uses('system'); // if you need to find all restarts search for "['init_scripts']" -- Gitblit v1.9.1