SRCDS Steam group


Remote Reboot / Shut Down Scripts
#1
I'm not a pro on coding, I did some google searching with terms like srcds remote reboot and all that good stuff and I am not able to come up with anything, some stuff that seemed promising were all dead links.

How would I go about locating a reboot, start, and stop scripts for srcds that can be controlled from a web page on the same server? Basically I'm trying to get a MINI control panel here, just a start, stop, and restart server. Nothing else.

I run the server in a screen, under a different username then the hosting account that is going to hold the server.

Any help is appreciated in advance. Thank you.
Reply
#2
I am asking the same question, so far i got this from King Goilio
Quote:For restarting it what you can do is make it output a pid file and when you want to kill the server just kill the pid.
I'm searching for exactly the same thing as you. How to implement a mini panel.
Reply
#3
Well the only problem is that you start it from an sh file, you need to have a pid file for that and the srcds one.
[Image: b_350x20_C002748-004880-FFFFFF-000000.png]
Reply
#4
i do know howto, but then you need mIRC, and IRC Relay on your server. T?hen if you have installed, and edited you standard command typ !standardhere.rcon _restart Then your server will restart.
I Wrote:Who eat all the donuts.
Reply
#5
tkjkdejong Wrote:i do know howto, but then you need mIRC, and IRC Relay on your server. T?hen if you have installed, and edited you standard command typ !standardhere.rcon _restart Then your server will restart.

Or shutdown depending in your setup.

I need to make a mini panel for my servers as well so one I get around to making(Stupid Lord of the Flies essay) it I will release it.
~ trewq
Reply
#6
You don't need an IRC server installed, plus my colocation forbids irc servers.

I have a game panel called swift panel, but I don't want to pay for it, so it no longer works. All the files are encrypted, so I can't see whats going on.
Reply
#7
http://hlsw.org
Reply
#8
does this hlsw have web files for me to upload?
Reply
#9
if you are just looking for something for personal use, try something like this: http://www.compmil.com/blog/webmin-modular-hldssrcdsts-server-control

a quick google of: webmin srcds

will provide a few more tutorials
Reply
#10
I appreciate it. Thanks.

I tried checking it out but apparently im missing webmin core. I just want a simple control. I dont want to have a server control interface, for my box, available on the net.
Reply
#11
Anything else available?
Reply
#12
Anyone know of any small control panels to start, stop, reboot, and give a server query of online, offline, map, and current slots?
Reply
#13
This PANEL is pretty good but requires some setup. It would be easier with HLSW it is pretty awesome and you just need a rcon password
Reply
#14
Or this one, pretty easy to set up. http://www.opengamepanel.org/news.php
[Image: b_350x20_C002748-004880-FFFFFF-000000.png]
Reply
#15
Something simple using php and guessing you are on linux

Change the $path variable and $exec
PHP Code:
<?php

/*
Simple SRCDS startup script
¦ Jean-Philippe Caissy
¦ Game servers by gamers, for gamers
¦ Offering CS and CS:S Servers at a great low price
¦ www.puppyservers.com

2009/04/24
*/

$path "/home/jp/server"//Path to srcds_run
$exec "srcds_amd"//Either srcds_amd or srcds_i686 or srcds_i486

switch($_GET['action']) {
    case 
"start":
        
exec("cd ".$path." && export LD_LIBRARY_PATH=\".:bin:\$LD_LIBRARY_PATH\" && nice -20 ./".$exec." -game cstrike +maxplayers 22 +ip 10.1.0.5 -port 27015 +sys_ticrate 100 -pingboost 2 +map de_dust2 -autoupdate -pidfile hlds_run.pid  2>&1 &");
    break;
    case 
"stop":
        
exec("kill `cat ".$path."/hlds_run.pid`");
        
exec("rm ".$path."/hlds_run.pid");
    break;
    case 
"forcestart":
        
exec("kill -9 `cat ".$path."/hlds_run.pid`");
        
exec("rm ".$path."/hlds_run.pid");
    break;    
    case 
"status":
        if(!
file_exists($path."/hlds_run.pid")) {
                return 
0;
            } else {
                
exec("ps -p `cat ".$path."/hlds_run.pid`"$output);
                if(
count($output) > 2)
                    return 
"An unknown error has occured, we got more than 2 process!";
                if(
count($output) === 1)
                    return 
0;
                else
                    return 
1;
            }
            
//returns 1 if server is running
    
break;    
}

?>

Usage:
file.php?action=start or file.php?action=stop or file.php?action=forcestop
file.php?action=status returns 1 if running
Jean-Philippe | Puppy Servers
Game servers by gamers, for gamers
Offering CS and CS:S Servers at a great low price
www.puppyservers.com
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)