Linux startup script

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

LeAdGuEsT

FNG / Fresh Meat
May 15, 2009
6
0
0
www.clanstarforum.com
Quick startup script(start/stop/restart)... Hope this is of any use.

Make sure to change the GAME_PATH

Code:
#!/bin/bash
#
# Init file for Killing Floor server
#
# chkconfig: 35 90 12
# description: Killing Floor
#
# source function library
. /etc/rc.d/init.d/functions
SCREEN_NAME=killing-floor
GAME_PATH=//srcds_l/killingfloor/system
 
start()
{
cd $GAME_PATH && /usr/bin/screen -A -m -d -S $SCREEN_NAME ./ucc-bin server KF-BioticsLab.rom?game=KFmod.KFGameType?VACSecure=true?MaxPlayers=6
}
stop()
{
PID=`ps fax | grep $SCREEN_NAME | grep SCREEN | awk '{ print $1 }'`
kill $PID
}
restart()
{
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
 

empereur

FNG / Fresh Meat
Nov 22, 2010
27
2
0
paris
I did not understand this tutorial. help me

I did not understand this tutorial. help me

hi all
I did not understand this tutorial.
help me
 
Last edited: