MCServer Autoupdate Script (for Linux)
#14
Should this restart script work? Is a php script that I found browsing the web. If set as an scheduled task maybe it detects if MCServer is crashed or deadlocked and restarts it.
PHP Code:
<?php
//options
$url 'localhost';
$port 25565;
$pauseLength 20;
//end options
$fp = @pfsockopen($url$port);
if (!
$fp) {
  echo 
'SERVER DOWN! Rebooting it.',"\r\n";
  `
Taskkill /IM MCServer.exe`;
  
sleep($pauseLength);
  `
C:\Users\user\Desktop\MCServer/MCServer.exe`;
} else {
  echo 
'SERVER UP :)';
}
?>
Reply
Thanks given by:


Messages In This Thread
RE: MCServer Autoupdate Script (for Linux) - by tonibm19 - 07-14-2013, 04:23 AM



Users browsing this thread: 1 Guest(s)