Marius Cramer
2013-11-14 7cf3e98090a3e9f0a9cc960d07c5f259adab6a19
server/mods-available/rescue_core_module.inc.php
@@ -433,7 +433,8 @@
    */
   private function _rescueDaemon($daemon){
      global $conf;
      $app->uses('system');
      // if you need to find all restarts search for "['init_scripts']"
      /*
       * First we stop the running service "normally"
@@ -445,8 +446,8 @@
       * So we have to try to stop but if this will not work, we have to kill the stopping
       * of the service
       */
      exec($conf['init_scripts'] . '/' . $daemon . ' stop && (sleep 3; kill $!; sleep 2; kill -9 $!) &> /dev/null');
      exec($app->system->getinitcommand($daemon, 'stop').' && (sleep 3; kill $!; sleep 2; kill -9 $!) &> /dev/null');
      /*
       * OK, we tryed to stop it normally, maybe this worked maybe not. So we have to look
       * if the service is already running or not. If so, we have to kill them hard
@@ -456,7 +457,7 @@
      /*
       * There are no more zombies left. Lets start the service..
       */
      exec($conf['init_scripts'] . '/' . $daemon . ' start');
      exec($app->system->getinitcommand($daemon, 'start'));
   }
}
?>