This is a script we use for all our instances, it's a nice wrapper script that allows you to use {start|stop|restart} to manage the servers. It's lightly modified from a script I found some time back for 1.6 and sadly I can't remember who originally wrote it to give them the credit. The only credit listed in the file is a cryptic "edited by jwm". In any event here it is
** note the params lines are both single lines but the mail program wrapped them #! /bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin DIR=/gaming/css1 DAEMON=$DIR/srcds_run # LAN-server: # PARAMS="-game cstrike -nomaster -insecure +sv_lan 1 +maxplayers 16 +map de_dust2" # Internet-server: PARAMS="-game cstrike -ip 111.222.111.222 -port 27018 -steamport 27081 +maxplayers 20 +map de_train -tvdisable" NAME=hardcss1 DESC="[H]ardCS:S Server #1" case "$1" in start) echo "Starting $DESC: $NAME" cd $DIR screen -d -m -S $NAME $DAEMON $PARAMS ;; stop) if [[ `screen -ls |grep $NAME` ]] then echo -n "Stopping $DESC: $NAME" kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'` echo " ... done." else echo "Coulnd't find a running $DESC" fi ;; restart) if [[ `screen -ls |grep $NAME` ]] then echo -n "Stopping $DESC: $NAME" kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'` echo " ... done." else echo "Coulnd't find a running $DESC" fi echo -n "Starting $DESC: $NAME" cd $DIR screen -d -m -S $NAME $DAEMON $PARAMS echo " ... done." ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0 Edited by jwm on Oct. 27 2002,05:14 ------------------------------------------------------------------------ ---- Brian "Duck" Holmes [H]ard|Gaming co-founder www.hardgaming.com _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux