Hello all,
As I've used this site to get CDG's CS:s server into running shape I thought it was nice to share a bit with the community, which has helped me. I recently modified a bash script that I used to control my HLDS servers.
This script assumes you have screen installed. I've tested this script on a SuSE and a Slackware distribution. If you encounter some problems with another distro you can post this ofcourse.
I've attached the script: just store it on a logical location in your installation, chmod it to something executable and finish configuring some variables so that it will know where to find everything:
Usage is very simple:
I hope this is any use to you. Enjoy!
As I've used this site to get CDG's CS:s server into running shape I thought it was nice to share a bit with the community, which has helped me. I recently modified a bash script that I used to control my HLDS servers.
This script assumes you have screen installed. I've tested this script on a SuSE and a Slackware distribution. If you encounter some problems with another distro you can post this ofcourse.
I've attached the script: just store it on a logical location in your installation, chmod it to something executable and finish configuring some variables so that it will know where to find everything:
Code:
SERVER_ADDRESS:
IP address on which the server should bind itself
SERVER_PORT:
Port number on which the server should bind itself
GAME:
Name of the mod (eg: "cstrike")
GAME_UPDATE:
Name of the game using the steam update tool (eg: "Counter-Strike Source")
MAXPLAYERS:
Maximum amount of players hosted on the server
STEAM_USER:
Your steam account ID you use to update the server
STEAM_PASS:
The password for your steam account
HEAPSIZE:
Amount of memory reserved for the server
SCREEN:
Location of the SCREEN binary (usually: "/usr/bin/screen")
SCREEN_NAME:
Name of the screen session. (Handy when running multiple SCREEN SESSIONS)
SERVER_HOME:
Location of the Half-Life Source Dedicated Server
STEAM_HOME:
Location of the Steam update utility
Code:
./srcds <start|stop|restart|console|status|update|help>
start:
starts the dedicated server
stop:
stops the dedicated server
restart:
stops and then starts the server again
console:
takes you to the server console, allowing you to control the server
status:
tells you whether the server is running or not
update:
stops server if it was running, updates it and then restarts it (if it was running)
help:
shows the usage syntax of the tool
I hope this is any use to you. Enjoy!
[CDG]GrefTek
Clan of the Dead Goat
Portal: http://www.cdg.net/
Forums: http://www.cdg.net/forums/
Gunshop: http://www.cdg.net/gunshop/
Clan of the Dead Goat
Portal: http://www.cdg.net/
Forums: http://www.cdg.net/forums/
Gunshop: http://www.cdg.net/gunshop/