SRCDS TF2, L4D and the like
#!/bin/sh # # Simple script to start TF2 server # Sat Dec 8 17:43:19 IST 2012 # # NOTE: This expects the TF2 server to be run as user "tf2server" # # Ensure this script is run as tf2server (EUID 500 in our case) only. if [[ $EUID -ne 500 ]]; then echo "This script can ONLY be run as user: tf2server" echo `/bin/grep tf2server /etc/passwd` echo "Perhaps you're root? Your EUID seems to be $EUID" exit 1 fi # User specified game vars MAP="jump_4starters_a9" MAXPLAYERS="24" GAMEIP="192.168.1.113" GAMEPORT="27015" GAMEPID="/home/tf2server/pids/tf2d.pid" GAMEDIR="/home/tf2server/hlds/gameserver/orangebox" GAMEBIN="./srcds_run" STEAMBIN="/home/tf2server/hlds/steam" GAMEOPTS="-game tf -autoupdate -steambin $STEAMBIN -maxplayers $MAXPLAYERS +map $MAP +ip $GAMEIP -port $GAMEPORT -pidfile $GAMEPID" # Nothing beyond this needs editing...