SRCDS Steam group


Start / Stop / Restart / Update server, through the web (php, html ...)- help
#1
Hello friends,

Sorry for my english,Big Grin
I have a very good dedicated server with Debian Linux, use a file (start.sh) that acts as Stat / Stop / Update but I have to do everything manually (. / Start.sh command) by the console server, you would have some script html, php to access the web, or something to give to a needy friend, I tried making one in php, but it was a dump, already tried several on the internet, but everyone teaches anyway, Wink I'm noob too, because I can not do this one.

I have everything running on my server (php, mysql, apache).

I will be forever grateful for helping me.

Regards to all.
Reply
#2
looking for the same thing Smile
hope some awesome coders can make this
Reply
#3
Look for gamepanelX
Interactive web based config creator for CS, CSS, TF2 and DODS
Creates server and client configs in an explained dialog.

You`ll also find precompiled debian gameserver kernels for download
Reply
#4
got some stuff as an example, then I'm doing here in my hand.
If vo help you spend what could:


within the directory Orangebox

name: liga.sh
..........................................

#!/bin/sh
#############################################
## SRCDS SERVER STARTUP SCRIPT V1.0 ##
## [10.10.2005] ##
## Created by: ##
## Ole Christian Rynning <oc@rynning.no> ##
## jce #norge.css @ quakenet ##
#############################################

#############################################
## CUSTOMIZE THESE VARIABLES TO YOUR NEEDS ##
#############################################

###
# SCRDS_NAME is the name of the instance
# for example customer_css, clanwarserver,
# and so on.
# Default: css
SRCDS_NAME="css"
###
# SCRDS_BIN is the binary used to run the
# server, for srcds linux, it is commonly
# ''srcds_run''
#
# The reason it is prefixed by ./ is that
# the script by default changes dir to the
# SRCDS_PATH directory before running the
# binary
SRCDS_BIN="./srcds_run"
###
# SRCDS_PATH defines the physical location
# where srcds is installed;
# for instance:
# ''/home/customer/srcds/''
SRCDS_PATH="."
###
# SRCDS_PIDFILE lets you specify a pidfile.
# if you want the pidfile in another location
# than the base dir of $SRCDS_PATH, you need
# to specify the full path;
# for instance:
# ''/home/customer/tmp/warserver.pid''
SRCDS_PIDFILE="${SRCDS_NAME}.pid"
###
# SRCDS_OPTS is all the default start options
# for the server that you cannot set in the
# server config files. Options such as tickrate,
# ip, port and max_fps are set here
SRCDS_OPTS="-game cstrike -console \
-autoupdate -pidfile ${SRDCS_PIDFILE} \
-tickrate 100 +maxplayers 12 +map de_dust2 \
-ip 217.78.96.31 -port 27015 +fps_max 600"

#############################################
## DO NOT EDIT ANYTHING BELOW THIS LINE! ##
#############################################
usage() {
echo "Usage: ${SRCDS_NAME} (stop|start|restart)"
exit 2
}

if [ -z $1 ]; then
usage
fi

srcds_start() {
OWD=`pwd`
cd $SRCDS_PATH
screen -AmdS ${SRCDS_NAME} ${SRCDS_BIN} ${SRCDS_OPTS}
cd $OWD
}

srcds_stop() {
screen -dr ${SRCDS_NAME} -X quit
}

srcds_restart() {
srcds_stop
srcds_start
}


case $1 in
stop)
srcds_stop
;;
start)
srcds_start
;;
restart)
srcds_restart
;;
*)
usage
esac

exit 0


within the directory 27010 within the directory www "apache"
................................................................................​..

start
.................

<?php
$output = shell_exec('cd /home/css/27010/orangebox/
./liga.sh start');
echo "<pre>$output</pre>";
?>


.........................................................................

stop
............

<?php
$output = shell_exec('cd /home/css/27010/orangebox/
./liga.sh stop');
echo "<pre>$output</pre>";
?>



Sorry for my english,Smile
Reply
#5
Hi, so this is working?
I'm thinking on developing my own gaming panel, but i have no clue on how to create servers and manage their status, using your code i think i have the manage part "done", the creating servers part i need to create something similiar, am i right?
Reply
#6
His code only works if you have a webserver and Gameserver on the same box. In any other cases you need to communicate. Possible ways (not complete list):
- PHP -> SSH2 (PECL)
- Deamon (Java/Pearl/...)
Interactive web based config creator for CS, CSS, TF2 and DODS
Creates server and client configs in an explained dialog.

You`ll also find precompiled debian gameserver kernels for download
Reply
#7
(10-25-2010, 11:56 AM)Glazz Wrote:  Hi, so this is working?
I'm thinking on developing my own gaming panel, but i have no clue on how to create servers and manage their status, using your code i think i have the manage part "done", the creating servers part i need to create something similiar, am i right?

If you dont have a clue how to make a srcds server programmatically you probably shouldn't even attempt it. Thats just my opinion, I dislike it when people try and do something that is way over their heads and rely on others to help and guide them step by step through it.

What language would you use?
~ trewq
Reply
#8
Currently i am writing my own interface. The system works with PHP -> SSH2
On the serverside there is a skript that is executed like:
./skript var1 var2 var3

To open the connection there are two options:
- user+password
- authkeys
Interactive web based config creator for CS, CSS, TF2 and DODS
Creates server and client configs in an explained dialog.

You`ll also find precompiled debian gameserver kernels for download
Reply
#9
(10-25-2010, 06:18 PM)Terrorkarotte Wrote:  His code only works if you have a webserver and Gameserver on the same box. In any other cases you need to communicate. Possible ways (not complete list):
- PHP -> SSH2 (PECL)
- Deamon (Java/Pearl/...)

Yes i know how to use SSH2 with PHP, my thing is i really don't know for sure if the way i'm thinking will work fine, at least i think it will, but i will make some tests in a few weeks.


(10-25-2010, 07:15 PM)Goilio Wrote:  
(10-25-2010, 11:56 AM)Glazz Wrote:  Hi, so this is working?
I'm thinking on developing my own gaming panel, but i have no clue on how to create servers and manage their status, using your code i think i have the manage part "done", the creating servers part i need to create something similiar, am i right?

If you dont have a clue how to make a srcds server programmatically you probably shouldn't even attempt it. Thats just my opinion, I dislike it when people try and do something that is way over their heads and rely on others to help and guide them step by step through it.

What language would you use?

I'm writing my admin panel in PHP, actually i have it working for creating cPanel/WHM accounts and TeamSpeak3 servers, and i'm going to try to start testing the gameserver part in a few weeks, if i get the time to it...

And why you say i shouldn't attempt? I learn quickly i just need some clues to know where to start, i don't need full codes or something like that
Reply
#10
Yer, sorry. We just have lots of people that come on here and don't have a clue and expect us to make it for them or give them a step by step guide.
~ trewq
Reply
#11
Yes i know =X thanks for the reply Wink
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)