dxr
2009-09-02 c8a1a63d0be8f19b23f1c8200e74831c62ec4162
server/server.php
@@ -56,6 +56,11 @@
  clearstatcache();
  for($i=0;$i<120;$i++){ // Wait max. 1200 sec, then proceed
    if(is_file($conf["temppath"].$conf["fs_div"].".ispconfig_lock")){
      exec("ps aux | grep '/usr/local/ispconfig/server/server.php' | grep -v 'grep' | wc -l", $check);
      if(intval($check[0]) > 1) { // 1 because this is 2nd instance!
          $app->log("There is already an instance of server.php running. Exiting.", LOGLEVEL_DEBUG);
          exit;
      }
     $app->log("There is already a lockfile set. Waiting another 10 seconds...", LOGLEVEL_DEBUG);
      sleep(10);
      clearstatcache();
@@ -127,4 +132,4 @@
die("finished.\n");
?>
?>