• 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!

[PANEL]Ots start,restart,stop,

loleslav

Banned User
Joined
Dec 5, 2008
Messages
173
Reaction score
0
Location
Poland,Kraków
Hello
I wrote you a panel.
In this panel can be managed by the browser, you can:
Turn on the application from the browser
Turn off applications from a browser
Restart the application from the browser


Eg afraid to give the tutor/gamemaster access to the ssh access

Just give him access to the panel
And how OTS deactivated and you will not he go through the panel switches

PHP:
<? 
if($_GET[start]=="tak"){ 
    @system("/usr/bin/sudo /home/tibia/start"); 
    header("Location: ".$_SERVER['HTTP_REFERER']); 
    echo '<a href="'.$_SERVER['HTTP_REFERER'].'">Powrót</a>'; 
    exit; 
    } 
if($_GET[stop]=="tak"){ 
    @system("/usr/bin/sudo /home/tibia/stop"); 
    header("Location: ".$_SERVER['HTTP_REFERER']); 
    echo '<a href="'.$_SERVER['HTTP_REFERER'].'">Powrót</a>'; 
    exit; 
    } 
if($_GET[restart]=="tak"){ 
    @system("/usr/bin/sudo /home/tibia/stop"); 
    @system("/usr/bin/sudo /home/tibia/start"); 
    header("Location: ".$_SERVER['HTTP_REFERER']); 
    echo '<a href="'.$_SERVER['HTTP_REFERER'].'">Powrót</a>'; 
    exit; 
    } 
?> 
<html> 
<head> 
<meta content="text/html; charset=iso-8859-2" 
http-equiv="content-type"> 
</head> 
<body style="color: rgb(0, 0, 0); background-color: rgb(204, 204, 255);" 
alink="#000099" link="#000099" vlink="#990099"> 
<table 
style="width: 800px; margin-left: auto; margin-right: auto; text-align: left;" 
border="0" cellpadding="2" cellspacing="2"> 
<tbody> 
<tr style="height: 50px; vertical-align: top;"> 
<td style="vertical-align: top; width: 100px;"> <br> 
</td> 
<td> TIBIA CONTROL<br> 
</td> 
<td style="vertical-align: top; width: 100px;"> <br> 
</td> 
</tr> 
<tr> 
<td style="vertical-align: top; width: 100px;"><br> 
</td> 
<td style="vertical-align: top;"> <a href="./?start=tak">START</a><br> 
<a href="./?stop=tak">STOP</a><br> 
<a href="./?restart=tak">RESTART</a><br> 
<br> 
</td> 
<td style="vertical-align: top; width: 100px;"><br> 
</td> 
</tr> 
<tr> 
<td style="vertical-align: top; width: 100px;"><br> 
</td> 
<td style="vertical-align: top;"> <br> 
</td> 
<td style="vertical-align: top; width: 100px;"><br> 
</td> 
</tr> 
</tbody> 
</table> 
<br> 
<br> 
</body> 
</html>
To the 2 entries in the /etc/sudoers were not problems with the rights:

Code:
www-data ALL= NOPASSWD: /home/tibia/start 
www-data ALL= NOPASSWD: /home/tibia/stop


Please protect htaccess

.htaccess generator

SS

2009-03-07_190226.png

2009-03-07_190337.png

2009-03-07_190356.png

2009-03-07_190418.png


Give me Reputation
 
wow thx man!
but is it open in "secreen 1" :)?
tell me somethink more
 
Wait. Slow.
Code:
/home/tibia/stop

Any1 must write this for himself? It's must be file stop in /home/tibia for killing OTS process?
 
Back
Top