Marius Burkard
2016-02-11 a7796bec1be01b51f400e9a3a698535b12b636aa
server/mods-available/rescue_core_module.inc.php
@@ -275,6 +275,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){
@@ -438,7 +449,7 @@
    * @param type $daemon the name of the daemon
    */
   private function _rescueDaemon($daemon){
      global $conf;
      global $app, $conf;
      $app->uses('system');
      // if you need to find all restarts search for "['init_scripts']"