SRCDS Steam group


Counter-Strike:Source Startup Script REMADED
#1
Exclamation 
hello there guys... i post this startup script cause i think is a lot usefull for peoples that need to start up automatic the server when system crashed btw i follow the instructions on srcds to make my counter strike source server.. so .. i remade the server.sh ....

so ... lets start...

1)
Code:
login with your root acount
2) install nano
Code:
yum install nano -y
3) make the statup script
Code:
nano /etc/init.d/css
4) paste the code below .... and save it as it is

Code:
#!/bin/sh
#chkconfig: 2345 95 20
#description: counter-strike:source server autostart
#processname: counter-strike:source

case "$1" in

start)

echo "Starting Counter-Strike:Source Server"
sleep 1
cd /root/srcds/css
screen -A -m -d -S css-server ./srcds_run -console -game cstrike -port 27015 +ip 0.0.0.0 +map de_dust +maxplayers 12 +exec server.cfg

;;



stop)

echo "Stopping Counter-Strike:Source Server"
sleep 1
screen -S css-server -X quit

;;
*)
  echo "Usage: $0 {start|stop}"
  exit 1
;;
esac
exit 0

5) make it writable
Code:
chmod 755 /etc/init.d/css
6) test it to check if works...
Code:
service css start
7) if works... then stop the server..
Code:
service css stop
8) register the script to startup when system reboot
Code:
chkconfig --levels 235 css on
9) reboot your system ... and enjoy your script
Code:
reboot

NOTES ...

1) if you want to see your server logs ... then write
Code:
screen -x css-server

and if you want to close it .. then press ctrl+a+d

if you have any question ... write here... THIS TOTURIAL HAVE BEEN TESTED ON CENTOS SYSTEM
[Image: b_350_20_692108_381007_FFFFFF_000000.png]
[Image: b_350_20_323957_202743_F19A15_111111.png]
Hellenic SF Gameservers To Do List
Reply
#2
(02-06-2013, 02:24 PM)Sakretsos Wrote:  ...

Yep! Still working. Thanks dude.
[TESTED ON CentOS]
Reply
#3
Very helpful! Thank you so much. Arborists
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)