• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Gesior Restarter Is not Working

Status
Not open for further replies.

MxSoft

Leave Tibia, Live Life.
Joined
Dec 22, 2009
Messages
1,804
Solutions
1
Reaction score
43
Location
Mexico
I need help to set my Gesior Restarter, is not working, when i press Restart I only Hear A beep In my Server But Nothing Happens.
 
Last edited:
In admin Panel in gesior acc comes an option Called RESTARTER:
Option Description
Restart Kills server process and starts new one.
Kill process Kills server process.
Start server Starts server.
Shutdown server instantly Allows you to safe shutdown server(using servers own shutdown function).
Player-friendly shutdown Performs safe shutdown after broadcast warning and 5 minutes delay.
Back to admin panel Go back to admin panel.
 
Here it is
<?PHP
$path = $config['site']['server_path'];
$exename = "theforgottenserver.exe";
if($group_id_of_acc_logged >= $config['site']['access_admin_panel'])
{
if($action == "")
{
$main_content .= '<table style=\'clear:both\' border=0 cellpadding=0 cellspacing=0 width=\'100%\'>
<tr bgcolor='.$config['site']['darkborder'].'><td width="150"><font color="red"><b>Option</b></font></td><td><font color="red"><b>Description</b></font></td></tr>
<tr bgcolor='.$config['site']['lightborder'].'><td width="150"><b><a href="?subtopic=restarter&action=restart">Restart</a></b></td><td><b>Kills server process and starts new one.</b></td></tr>
<tr bgcolor='.$config['site']['darkborder'].'><td width="150"><b><a href="?subtopic=restarter&action=kill">Kill process</a></b></td><td><b>Kills server process.</b></td></tr>
<tr bgcolor='.$config['site']['lightborder'].'><td width="150"><b><a href="?subtopic=restarter&action=start">Start server</a></b></td><td><b>Starts server.</b></td></tr>
<tr bgcolor='.$config['site']['darkborder'].'><td width="150"><b><a href="?subtopic=restarter&action=shutdown">Shutdown server instantly</a></b></td><td><b>Allows you to safe shutdown server(using servers own shutdown function).</b></td></tr>
<tr bgcolor='.$config['site']['lightborder'].'><td width="150"><b><a href="?subtopic=restarter&action=shutdownlong">Player-friendly shutdown</a></b></td><td><b>Performs safe shutdown after broadcast warning and 5 minutes delay.</b></td></tr>
<tr bgcolor='.$config['site']['darkborder'].'><td width="150"><b><a href="?subtopic=adminpanel">Back to admin panel</a></b></td><td><b>Go back to admin panel.</b></td></tr>
</table>';
}
getcwd();
chdir($path);
if($action == "restart")
{
exec('TASKKILL /F /IM ".$exename."');
$command = 'START/HIGH '.$exename;
$tmpnam = "temp.bat";
$fp = fopen ($tmpnam, "w");
fwrite($fp, $command);
fclose ($fp);
$foo = @popen($tmpnam, 'r');
$main_content .='<center>Server restarted.<br><b><a href="?subtopic=restarter">Back</a></center>';
}
if($action == "kill"){exec('TASKKILL /F /IM "'.$exename.'"'); $main_content .='<center>Server closed.<br><b><a href="?subtopic=restarter">Back</a></center>';}
if($action == "start")
{
$command = 'START/HIGH '.$exename;
$tmpnam = "temp.bat";
$fp = fopen ($tmpnam, "w");
fwrite($fp, $command);
fclose ($fp);
$foo = @popen($tmpnam, 'r');
$main_content .='<center>Server started. <br><b><a href="?subtopic=restarter">Back</a></center>';
}
if($action == "shutdown")
{
$SQL->query('UPDATE '.$SQL->tableName('z_shut').' SET `shutdown`="1", `long`="0" WHERE id = "1";');
$main_content .='<center>Server will shut down soon. <br><b><a href="?subtopic=restarter">Back</a></center>';
}
if($action == "shutdownlong")
{
$SQL->query('UPDATE '.$SQL->tableName('z_shut').' SET `shutdown`="1", `long`="1" WHERE `id` = "1";');
$main_content .='<center>Server will shut down soon. <br><b><a href="?subtopic=restarter">Back</a></center>';
}
}
else
{
$title = $GLOBALS['config']['server']["serverName"]." - OTS";
$main_content .= 'Invalid subtopic. Can\'t load page.';
}
?>
 
Status
Not open for further replies.
Back
Top