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)
2) install nano
3) make the statup script
4) paste the code below .... and save it as it is
5) make it writable
6) test it to check if works...
7) if works... then stop the server..
8) register the script to startup when system reboot
9) reboot your system ... and enjoy your script
NOTES ...
1) if you want to see your server logs ... then write
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
so ... lets start...
1)
Code:
login with your root acountCode:
yum install nano -yCode:
nano /etc/init.d/cssCode:
#!/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 05) make it writable
Code:
chmod 755 /etc/init.d/cssCode:
service css startCode:
service css stopCode:
chkconfig --levels 235 css onCode:
rebootNOTES ...
1) if you want to see your server logs ... then write
Code:
screen -x css-serverand 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

