Browse Source

Added fn_details & changed server files default location

* Added details function to all game scripts
* Changed filesdir so all server files will be located in 'serverfiles'
directory and not 'csgo'/tf2 etc directory
pull/8/merge
Daniel Gibbs 12 years ago
parent
commit
305995fe72
  1. 102
      CounterStrike/csserver
  2. 99
      CounterStrikeGlobalOffensive/csgoserver
  3. 102
      CounterStrikeSource/cssserver
  4. 101
      DayOfDefeatSource/dodsserver
  5. 103
      HalfLife2Deathmatch/hl2dmserver
  6. 28
      KillingFloor/kfserver
  7. 107
      Left4Dead2/l4d2server
  8. 118
      RedOrchestra/roserver
  9. 102
      TeamFortress2/tf2server
  10. 28
      UnrealTournament2004/ut2k4server

102
CounterStrike/csserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 010813
# Version: 310813
#### Variables ####
@ -15,7 +15,8 @@ email="[email protected]"
# Start vars
defaultmap="de_aztec"
port="27015"
parms="-game cstrike +map ${defaultmap} -strictportbind +port ${port}"
clientport="27005"
parms="-game cstrike +map ${defaultmap} -strictportbind -port ${port} +clientport ${clientport}"
#### Advanced Variables ####
@ -25,13 +26,15 @@ appid="90"
# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
filesdir="${rootdir}/cs"
filesdir="${rootdir}/serverfiles"
servercfg="${filesdir}/cstrike/server.cfg"
# Server names
servicename="cs-server"
gamename="Counter Strike 1.6"
engine="goldsource"
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
# Logging
logdir="${rootdir}/log/script"
@ -289,6 +292,76 @@ cd steamcmd
./steamcmd.sh +login anonymous +force_install_dir ${filesdir} +app_update ${appid} validate +quit |tee -a ${logfile}
}
fn_details(){
echo ""
echo "${gamename} Server Details"
echo "============================"
echo ""
echo "${servername} Ports"
echo "======================="
if [ "${engine}" = "unreal2" ];then
gameport=$(grep Port= ${systemdir}/${ini}|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g')
queryport=$((${gameport} + 1))
gsqueryport=$(grep OldQueryPortNumber= ${systemdir}/${ini}|sed 's/\OldQueryPortNumber=//g')
webadminport=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminuser=$(grep AdminName= ${systemdir}/${ini}|sed 's/\AdminName=//g')
webadminpass=$(grep AdminPassword= ${systemdir}/${ini}|sed 's/\AdminPassword=//g')
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT INI VARIABLE"
echo "INBOUND Game Port ${gameport} UDP Port=${gameport}"
echo "INBOUND Query Port ${queryport} UDP n/a"
if [ "${appid}" != "223250" ];then
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
fi
if [ "${appid}" == "215360" ];then
echo "OUTBOUND Master Server port 28852 TCP/UDP n/a"
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
if [ "${appid}" == "223250" ];then
echo "OUTBOUND Steam Port 20610 UDP n/a"
else
echo "OUTBOUND Steam Port 20660 UDP n/a"
fi
fi
echo "INBOUND WebAdmin ${webadminport} TCP ListenPort=${webadminport}"
echo ""
echo "${servername} WebAdmin"
echo "======================="
echo "WebAdmin URL: http://localhost:${webadminport}"
echo "WebAdmin Username: ${webadminuser}"
echo "WebAdmin Password: ${webadminpass}"
echo ""
echo "Config file"
echo "${systemdir}/${ini}"
elif [ "${engine}" = "source" ]||[ "${engine}" = "goldsource" ];then
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/Rcon Port ${port}"
if [ "${engine}" = "source" ];then
echo "INBOUND SourceTV Port ${sourcetvport}"
fi
echo "OUTBOUND Client Port ${clientport}"
echo ""
echo "You can change ports by editing the"
echo "start parameters in ${selfname}"
echo ""
echo "${servername} Details"
echo "======================="
echo "Server name: ${servername}"
echo "Rcon Password: ${rcon}"
echo ""
echo "Config file:"
echo "${servercfg}"
fi
echo ""
}
#
## Installer
#
@ -387,11 +460,11 @@ echo "================================="
* ) echo "Please answer yes or no.";;
esac
done
echo ""
fn_header
echo "Configuring ${gamename} Server"
echo "================================="
read -p "Enter rcon password: " rconpass
read -p "Enter server name: " servername
read -p "Enter rcon password: " rconpass
sleep 1
echo ""
echo "Creating server.cfg"
@ -452,19 +525,8 @@ echo "================================="
mkdir -v ${rootdir}/.steam/sdk32
cp -v ${filesdir}/steamclient.so ${rootdir}/.steam/sdk32/steamclient.so
sleep 1
echo ""
echo "${gamename} Server Details"
echo "================================="
hostname=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Server hostname: ${hostname}"
echo "Rcon password: ${rcon}"
echo "You can edit these in server.cfg:"
echo "${servercfg}"
echo ""
echo "Server IP: localhost:27015"
echo "You can change port by editing the"
echo "start parms in ${selfname}"
fn_header
fn_details
echo "================================="
echo "Install Complete!"
echo ""
@ -492,8 +554,10 @@ case "$1" in
fn_debugserver;;
email-test)
fn_emailtest;;
details)
fn_details;;
*)
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test}"
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test|details}"
exit 1;;
esac
exit

99
CounterStrikeGlobalOffensive/csgoserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 010813
# Version: 310813
#### Variables ####
@ -27,13 +27,15 @@ appid="740"
# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
filesdir="${rootdir}/csgo"
filesdir="${rootdir}/serverfiles"
servercfg="${filesdir}/csgo/cfg/server.cfg"
# Server names
servicename="csgo-server"
gamename="Counter Strike: Global Offensive"
engine="source"
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
# Logging
logdir="${rootdir}/log/script"
@ -291,6 +293,76 @@ cd steamcmd
./steamcmd.sh +login anonymous +force_install_dir ${filesdir} +app_update ${appid} validate +quit |tee -a ${logfile}
}
fn_details(){
echo ""
echo "${gamename} Server Details"
echo "============================"
echo ""
echo "${servername} Ports"
echo "======================="
if [ "${engine}" = "unreal2" ];then
gameport=$(grep Port= ${systemdir}/${ini}|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g')
queryport=$((${gameport} + 1))
gsqueryport=$(grep OldQueryPortNumber= ${systemdir}/${ini}|sed 's/\OldQueryPortNumber=//g')
webadminport=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminuser=$(grep AdminName= ${systemdir}/${ini}|sed 's/\AdminName=//g')
webadminpass=$(grep AdminPassword= ${systemdir}/${ini}|sed 's/\AdminPassword=//g')
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT INI VARIABLE"
echo "INBOUND Game Port ${gameport} UDP Port=${gameport}"
echo "INBOUND Query Port ${queryport} UDP n/a"
if [ "${appid}" != "223250" ];then
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
fi
if [ "${appid}" == "215360" ];then
echo "OUTBOUND Master Server port 28852 TCP/UDP n/a"
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
if [ "${appid}" == "223250" ];then
echo "OUTBOUND Steam Port 20610 UDP n/a"
else
echo "OUTBOUND Steam Port 20660 UDP n/a"
fi
fi
echo "INBOUND WebAdmin ${webadminport} TCP ListenPort=${webadminport}"
echo ""
echo "${servername} WebAdmin"
echo "======================="
echo "WebAdmin URL: http://localhost:${webadminport}"
echo "WebAdmin Username: ${webadminuser}"
echo "WebAdmin Password: ${webadminpass}"
echo ""
echo "Config file"
echo "${systemdir}/${ini}"
elif [ "${engine}" = "source" ]||[ "${engine}" = "goldsource" ];then
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/Rcon Port ${port}"
if [ "${engine}" = "source" ];then
echo "INBOUND SourceTV Port ${sourcetvport}"
fi
echo "OUTBOUND Client Port ${clientport}"
echo ""
echo "You can change ports by editing the"
echo "start parameters in ${selfname}"
echo ""
echo "${servername} Details"
echo "======================="
echo "Server name: ${servername}"
echo "Rcon Password: ${rcon}"
echo ""
echo "Config file:"
echo "${servercfg}"
fi
echo ""
}
#
## Installer
#
@ -388,11 +460,11 @@ echo "================================="
* ) echo "Please answer yes or no.";;
esac
done
echo ""
fn_header
echo "Configuring ${gamename} Server"
echo "================================="
read -p "Enter rcon password: " rconpass
read -p "Enter server name: " servername
read -p "Enter rcon password: " rconpass
sleep 1
echo ""
echo "Creating server.cfg"
@ -429,19 +501,8 @@ echo "================================="
mkdir -v ${rootdir}/.steam/sdk32
cp -v ${filesdir}/bin/steamclient.so ${rootdir}/.steam/sdk32/steamclient.so
sleep 1
echo ""
echo "${gamename} Server Details"
echo "================================="
hostname=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Server hostname: ${hostname}"
echo "Rcon password: ${rcon}"
echo "You can edit these in server.cfg:"
echo "${servercfg}"
echo ""
echo "Server IP: localhost:27015"
echo "You can change port by editing the"
echo "start parms in ${selfname}"
fn_header
fn_details
echo "================================="
echo "Install Complete!"
echo ""
@ -469,8 +530,10 @@ case "$1" in
fn_debugserver;;
email-test)
fn_emailtest;;
details)
fn_details;;
*)
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test}"
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test|details}"
exit 1;;
esac
exit

102
CounterStrikeSource/cssserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 010813
# Version: 310813
#### Variables ####
@ -27,13 +27,16 @@ appid="232330"
# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
filesdir="${rootdir}/css"
filesdir="${rootdir}/serverfiles"
servercfg="${filesdir}/cstrike/cfg/server.cfg"
# Server names
# Server Details
servicename="css-server"
gamename="Counter Strike: Source"
engine="source"
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
# Logging
logdir="${rootdir}/log/script"
@ -291,6 +294,76 @@ cd steamcmd
./steamcmd.sh +login anonymous +force_install_dir ${filesdir} +app_update ${appid} validate +quit |tee -a ${logfile}
}
fn_details(){
echo ""
echo "${gamename} Server Details"
echo "============================"
echo ""
echo "${servername} Ports"
echo "======================="
if [ "${engine}" = "unreal2" ];then
gameport=$(grep Port= ${systemdir}/${ini}|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g')
queryport=$((${gameport} + 1))
gsqueryport=$(grep OldQueryPortNumber= ${systemdir}/${ini}|sed 's/\OldQueryPortNumber=//g')
webadminport=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminuser=$(grep AdminName= ${systemdir}/${ini}|sed 's/\AdminName=//g')
webadminpass=$(grep AdminPassword= ${systemdir}/${ini}|sed 's/\AdminPassword=//g')
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT INI VARIABLE"
echo "INBOUND Game Port ${gameport} UDP Port=${gameport}"
echo "INBOUND Query Port ${queryport} UDP n/a"
if [ "${appid}" != "223250" ];then
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
fi
if [ "${appid}" == "215360" ];then
echo "OUTBOUND Master Server port 28852 TCP/UDP n/a"
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
if [ "${appid}" == "223250" ];then
echo "OUTBOUND Steam Port 20610 UDP n/a"
else
echo "OUTBOUND Steam Port 20660 UDP n/a"
fi
fi
echo "INBOUND WebAdmin ${webadminport} TCP ListenPort=${webadminport}"
echo ""
echo "${servername} WebAdmin"
echo "======================="
echo "WebAdmin URL: http://localhost:${webadminport}"
echo "WebAdmin Username: ${webadminuser}"
echo "WebAdmin Password: ${webadminpass}"
echo ""
echo "Config file"
echo "${systemdir}/${ini}"
elif [ "${engine}" = "source" ]||[ "${engine}" = "goldsource" ];then
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/Rcon Port ${port}"
if [ "${engine}" = "source" ];then
echo "INBOUND SourceTV Port ${sourcetvport}"
fi
echo "OUTBOUND Client Port ${clientport}"
echo ""
echo "You can change ports by editing the"
echo "start parameters in ${selfname}"
echo ""
echo "${servername} Details"
echo "======================="
echo "Server name: ${servername}"
echo "Rcon Password: ${rcon}"
echo ""
echo "Config file:"
echo "${servercfg}"
fi
echo ""
}
#
## Installer
#
@ -388,11 +461,11 @@ echo "================================="
* ) echo "Please answer yes or no.";;
esac
done
echo ""
fn_header
echo "Configuring ${gamename} Server"
echo "================================="
read -p "Enter rcon password: " rconpass
read -p "Enter server name: " servername
read -p "Enter rcon password: " rconpass
sleep 1
echo ""
echo "Creating server.cfg"
@ -429,19 +502,8 @@ echo "================================="
mkdir -v ${rootdir}/.steam/sdk32
cp -v ${filesdir}/bin/steamclient.so ${rootdir}/.steam/sdk32/steamclient.so
sleep 1
echo ""
echo "${gamename} Server Details"
echo "================================="
hostname=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Server hostname: ${hostname}"
echo "Rcon password: ${rcon}"
echo "You can edit these in server.cfg:"
echo "${servercfg}"
echo ""
echo "Server IP: localhost:27015"
echo "You can change port by editing the"
echo "start parms in ${selfname}"
fn_header
fn_details
echo "================================="
echo "Install Complete!"
echo ""
@ -469,8 +531,10 @@ case "$1" in
fn_debugserver;;
email-test)
fn_emailtest;;
details)
fn_details;;
*)
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test}"
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test|details}"
exit 1;;
esac
exit

101
DayOfDefeatSource/dodsserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 010813
# Version: 310813
#### Variables ####
@ -27,13 +27,15 @@ appid="232290"
# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
filesdir="${rootdir}/dods"
filesdir="${rootdir}/serverfiles"
servercfg="${filesdir}/dod/cfg/server.cfg"
# Server names
# Server Details
servicename="dods-server"
gamename="Day of Defeat: Source"
engine="source"
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
# Logging
logdir="${rootdir}/log/script"
@ -291,6 +293,76 @@ cd steamcmd
./steamcmd.sh +login anonymous +force_install_dir ${filesdir} +app_update ${appid} validate +quit |tee -a ${logfile}
}
fn_details(){
echo ""
echo "${gamename} Server Details"
echo "============================"
echo ""
echo "${servername} Ports"
echo "======================="
if [ "${engine}" = "unreal2" ];then
gameport=$(grep Port= ${systemdir}/${ini}|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g')
queryport=$((${gameport} + 1))
gsqueryport=$(grep OldQueryPortNumber= ${systemdir}/${ini}|sed 's/\OldQueryPortNumber=//g')
webadminport=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminuser=$(grep AdminName= ${systemdir}/${ini}|sed 's/\AdminName=//g')
webadminpass=$(grep AdminPassword= ${systemdir}/${ini}|sed 's/\AdminPassword=//g')
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT INI VARIABLE"
echo "INBOUND Game Port ${gameport} UDP Port=${gameport}"
echo "INBOUND Query Port ${queryport} UDP n/a"
if [ "${appid}" != "223250" ];then
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
fi
if [ "${appid}" == "215360" ];then
echo "OUTBOUND Master Server port 28852 TCP/UDP n/a"
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
if [ "${appid}" == "223250" ];then
echo "OUTBOUND Steam Port 20610 UDP n/a"
else
echo "OUTBOUND Steam Port 20660 UDP n/a"
fi
fi
echo "INBOUND WebAdmin ${webadminport} TCP ListenPort=${webadminport}"
echo ""
echo "${servername} WebAdmin"
echo "======================="
echo "WebAdmin URL: http://localhost:${webadminport}"
echo "WebAdmin Username: ${webadminuser}"
echo "WebAdmin Password: ${webadminpass}"
echo ""
echo "Config file"
echo "${systemdir}/${ini}"
elif [ "${engine}" = "source" ]||[ "${engine}" = "goldsource" ];then
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/Rcon Port ${port}"
if [ "${engine}" = "source" ];then
echo "INBOUND SourceTV Port ${sourcetvport}"
fi
echo "OUTBOUND Client Port ${clientport}"
echo ""
echo "You can change ports by editing the"
echo "start parameters in ${selfname}"
echo ""
echo "${servername} Details"
echo "======================="
echo "Server name: ${servername}"
echo "Rcon Password: ${rcon}"
echo ""
echo "Config file:"
echo "${servercfg}"
fi
echo ""
}
#
## Installer
#
@ -388,11 +460,11 @@ echo "================================="
* ) echo "Please answer yes or no.";;
esac
done
echo ""
fn_header
echo "Configuring ${gamename} Server"
echo "================================="
read -p "Enter rcon password: " rconpass
read -p "Enter server name: " servername
read -p "Enter rcon password: " rconpass
sleep 1
echo ""
echo "Creating server.cfg"
@ -429,19 +501,8 @@ echo "================================="
mkdir -v ${rootdir}/.steam/sdk32
cp -v ${filesdir}/bin/steamclient.so ${rootdir}/.steam/sdk32/steamclient.so
sleep 1
echo ""
echo "${gamename} Server Details"
echo "================================="
hostname=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Server hostname: ${hostname}"
echo "Rcon password: ${rcon}"
echo "You can edit these in server.cfg:"
echo "${servercfg}"
echo ""
echo "Server IP: localhost:27015"
echo "You can change port by editing the"
echo "start parms in ${selfname}"
fn_header
fn_details
echo "================================="
echo "Install Complete!"
echo ""
@ -469,8 +530,10 @@ case "$1" in
fn_debugserver;;
email-test)
fn_emailtest;;
details)
fn_details;;
*)
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test}"
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test|details}"
exit 1;;
esac
exit

103
HalfLife2Deathmatch/hl2dmserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 010813
# Version: 310813
#### Variables ####
@ -27,13 +27,17 @@ appid="232370"
# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
filesdir="${rootdir}/hl2dm"
filesdir="${rootdir}/serverfiles"
servercfg="${filesdir}/hl2mp/cfg/server.cfg"
# Server names
# Server Details
servicename="hl2dm-server"
gamename="Half Life 2: Deathmatch"
engine="source"
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
# Logging
logdir="${rootdir}/log/script"
@ -291,6 +295,76 @@ cd steamcmd
./steamcmd.sh +login anonymous +force_install_dir ${filesdir} +app_update ${appid} validate +quit |tee -a ${logfile}
}
fn_details(){
echo ""
echo "${gamename} Server Details"
echo "============================"
echo ""
echo "${servername} Ports"
echo "======================="
if [ "${engine}" = "unreal2" ];then
gameport=$(grep Port= ${systemdir}/${ini}|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g')
queryport=$((${gameport} + 1))
gsqueryport=$(grep OldQueryPortNumber= ${systemdir}/${ini}|sed 's/\OldQueryPortNumber=//g')
webadminport=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminuser=$(grep AdminName= ${systemdir}/${ini}|sed 's/\AdminName=//g')
webadminpass=$(grep AdminPassword= ${systemdir}/${ini}|sed 's/\AdminPassword=//g')
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT INI VARIABLE"
echo "INBOUND Game Port ${gameport} UDP Port=${gameport}"
echo "INBOUND Query Port ${queryport} UDP n/a"
if [ "${appid}" != "223250" ];then
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
fi
if [ "${appid}" == "215360" ];then
echo "OUTBOUND Master Server port 28852 TCP/UDP n/a"
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
if [ "${appid}" == "223250" ];then
echo "OUTBOUND Steam Port 20610 UDP n/a"
else
echo "OUTBOUND Steam Port 20660 UDP n/a"
fi
fi
echo "INBOUND WebAdmin ${webadminport} TCP ListenPort=${webadminport}"
echo ""
echo "${servername} WebAdmin"
echo "======================="
echo "WebAdmin URL: http://localhost:${webadminport}"
echo "WebAdmin Username: ${webadminuser}"
echo "WebAdmin Password: ${webadminpass}"
echo ""
echo "Config file"
echo "${systemdir}/${ini}"
elif [ "${engine}" = "source" ]||[ "${engine}" = "goldsource" ];then
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/Rcon Port ${port}"
if [ "${engine}" = "source" ];then
echo "INBOUND SourceTV Port ${sourcetvport}"
fi
echo "OUTBOUND Client Port ${clientport}"
echo ""
echo "You can change ports by editing the"
echo "start parameters in ${selfname}"
echo ""
echo "${servername} Details"
echo "======================="
echo "Server name: ${servername}"
echo "Rcon Password: ${rcon}"
echo ""
echo "Config file:"
echo "${servercfg}"
fi
echo ""
}
#
## Installer
#
@ -388,11 +462,11 @@ echo "================================="
* ) echo "Please answer yes or no.";;
esac
done
echo ""
fn_header
echo "Configuring ${gamename} Server"
echo "================================="
read -p "Enter rcon password: " rconpass
read -p "Enter server name: " servername
read -p "Enter rcon password: " rconpass
sleep 1
echo ""
echo "Creating server.cfg"
@ -429,19 +503,8 @@ echo "================================="
mkdir -v ${rootdir}/.steam/sdk32
cp -v ${filesdir}/bin/steamclient.so ${rootdir}/.steam/sdk32/steamclient.so
sleep 1
echo ""
echo "${gamename} Server Details"
echo "================================="
hostname=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Server hostname: ${hostname}"
echo "Rcon password: ${rcon}"
echo "You can edit these in server.cfg:"
echo "${servercfg}"
echo ""
echo "Server IP: localhost:27015"
echo "You can change port by editing the"
echo "start parms in ${selfname}"
fn_header
fn_details
echo "================================="
echo "Install Complete!"
echo ""
@ -469,8 +532,10 @@ case "$1" in
fn_debugserver;;
email-test)
fn_emailtest;;
details)
fn_details;;
*)
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test}"
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test|details}"
exit 1;;
esac
exit

28
KillingFloor/kfserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 300813
# Version: 310813
#### Variables ####
@ -22,7 +22,7 @@ appid="215360"
# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
filesdir="${rootdir}/killingfloor"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/System"
compressedmapsdir="${rootdir}/Maps-Compressed"
@ -41,7 +41,7 @@ logdays="7"
# Start vars
defaultmap="KF-BioticsLab.rom"
parms="server ${defaultmap}?game=KFmod.KFGameType -nohomedir ini=${ini} log=${logfile}"
parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini=${ini} log=${logfile}"
##### Script #####
# Do not edit
@ -373,7 +373,7 @@ if [ "${engine}" = "unreal2" ];then
gameport=$(grep Port= ${systemdir}/${ini}|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g')
queryport=$((${gameport} + 1))
gsqueryport=$(grep OldQueryPortNumber= ${systemdir}/${ini}|sed 's/\OldQueryPortNumber=//g')
webadmin=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminport=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminuser=$(grep AdminName= ${systemdir}/${ini}|sed 's/\AdminName=//g')
webadminpass=$(grep AdminPassword= ${systemdir}/${ini}|sed 's/\AdminPassword=//g')
echo "Ports the server is currently using"
@ -381,34 +381,41 @@ if [ "${engine}" = "unreal2" ];then
echo "DIRECTION DESCRIPTION PORT INI VARIABLE"
echo "INBOUND Game Port ${gameport} UDP Port=${gameport}"
echo "INBOUND Query Port ${queryport} UDP n/a"
if [ "${appid}" != "223250" ];then
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
if [ "${gamename}" == "Killing Floor" ];then
fi
if [ "${appid}" == "215360" ];then
echo "OUTBOUND Master Server port 28852 TCP/UDP n/a"
elif [ "${gamename}" == "Unreal Tournament 2004" ];then
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
if [ "${appid}" == "223250" ];then
echo "OUTBOUND Steam Port 20610 UDP n/a"
else
echo "OUTBOUND Steam Port 20660 UDP n/a"
fi
echo "INBOUND WebAdmin ${webadmin} TCP ListenPort=${webadmin}"
fi
echo "INBOUND WebAdmin ${webadminport} TCP ListenPort=${webadminport}"
echo ""
echo "${servername} WebAdmin"
echo "======================="
echo "WebAdmin URL: http://localhost:${webadmin}"
echo "WebAdmin URL: http://localhost:${webadminport}"
echo "WebAdmin Username: ${webadminuser}"
echo "WebAdmin Password: ${webadminpass}"
echo ""
echo "Config file"
echo "${systemdir}/${ini}"
elif [ "${engine}" = "source" ];then
elif [ "${engine}" = "source" ]||[ "${engine}" = "goldsource" ];then
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/Rcon Port ${port}"
if [ "${engine}" = "source" ];then
echo "INBOUND SourceTV Port ${sourcetvport}"
fi
echo "OUTBOUND Client Port ${clientport}"
echo ""
echo "You can change ports by editing the"
@ -523,6 +530,7 @@ echo "================================="
fn_header
echo "Configuring ${gamename} Server"
echo "================================="
sleep 1
echo "Copying ${systemdir}/default.ini to ${systemdir}/${ini}"
cp ${systemdir}/Default.ini ${systemdir}/${ini}
sleep 1

107
Left4Dead2/l4d2server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 010813
# Version: 310813
#### Variables ####
@ -15,7 +15,9 @@ email="[email protected]"
# Start vars
defaultmap="c5m1_waterfront"
port="27015"
parms="-strictportbind -game left4dead2 +port ${port} +map ${defaultmap}"
sourcetvport="27020"
clientport="27005"
parms="-game left4dead2 +map ${defaultmap} -strictportbind -port ${port} +tv_port ${sourcetvport} +clientport ${clientport}"
#### Advanced Variables ####
@ -25,14 +27,15 @@ appid="222860"
# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
filesdir="${rootdir}/l4d2"
filesdir="${rootdir}/serverfiles"
servercfg="${filesdir}/left4dead2/cfg/server.cfg"
# Server names
# Server Details
servicename="l4d2-server"
gamename="Left 4 Dead 2"
engine="source"
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
# Logging
logdir="${rootdir}/log/script"
@ -290,6 +293,76 @@ cd steamcmd
./steamcmd.sh +login anonymous +force_install_dir ${filesdir} +app_update ${appid} validate +quit |tee -a ${logfile}
}
fn_details(){
echo ""
echo "${gamename} Server Details"
echo "============================"
echo ""
echo "${servername} Ports"
echo "======================="
if [ "${engine}" = "unreal2" ];then
gameport=$(grep Port= ${systemdir}/${ini}|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g')
queryport=$((${gameport} + 1))
gsqueryport=$(grep OldQueryPortNumber= ${systemdir}/${ini}|sed 's/\OldQueryPortNumber=//g')
webadminport=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminuser=$(grep AdminName= ${systemdir}/${ini}|sed 's/\AdminName=//g')
webadminpass=$(grep AdminPassword= ${systemdir}/${ini}|sed 's/\AdminPassword=//g')
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT INI VARIABLE"
echo "INBOUND Game Port ${gameport} UDP Port=${gameport}"
echo "INBOUND Query Port ${queryport} UDP n/a"
if [ "${appid}" != "223250" ];then
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
fi
if [ "${appid}" == "215360" ];then
echo "OUTBOUND Master Server port 28852 TCP/UDP n/a"
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
if [ "${appid}" == "223250" ];then
echo "OUTBOUND Steam Port 20610 UDP n/a"
else
echo "OUTBOUND Steam Port 20660 UDP n/a"
fi
fi
echo "INBOUND WebAdmin ${webadminport} TCP ListenPort=${webadminport}"
echo ""
echo "${servername} WebAdmin"
echo "======================="
echo "WebAdmin URL: http://localhost:${webadminport}"
echo "WebAdmin Username: ${webadminuser}"
echo "WebAdmin Password: ${webadminpass}"
echo ""
echo "Config file"
echo "${systemdir}/${ini}"
elif [ "${engine}" = "source" ]||[ "${engine}" = "goldsource" ];then
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/Rcon Port ${port}"
if [ "${engine}" = "source" ];then
echo "INBOUND SourceTV Port ${sourcetvport}"
fi
echo "OUTBOUND Client Port ${clientport}"
echo ""
echo "You can change ports by editing the"
echo "start parameters in ${selfname}"
echo ""
echo "${servername} Details"
echo "======================="
echo "Server name: ${servername}"
echo "Rcon Password: ${rcon}"
echo ""
echo "Config file:"
echo "${servercfg}"
fi
echo ""
}
#
## Installer
#
@ -387,11 +460,11 @@ echo "================================="
* ) echo "Please answer yes or no.";;
esac
done
echo ""
fn_header
echo "Configuring ${gamename} Server"
echo "================================="
read -p "Enter rcon password: " rconpass
read -p "Enter server name: " servername
read -p "Enter rcon password: " rconpass
sleep 1
echo ""
echo "Creating server.cfg"
@ -413,6 +486,7 @@ echo "================================="
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee ${servercfg} > /dev/null 2>&1
sleep 1
echo ""
echo "Setting up logging"
@ -428,19 +502,8 @@ echo "================================="
mkdir -v ${rootdir}/.steam/sdk32
cp -v ${filesdir}/bin/steamclient.so ${rootdir}/.steam/sdk32/steamclient.so
sleep 1
echo ""
echo "${gamename} Server Details"
echo "================================="
hostname=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Server hostname: ${hostname}"
echo "Rcon password: ${rcon}"
echo "You can edit these in server.cfg:"
echo "${servercfg}"
echo ""
echo "Server IP: localhost:27015"
echo "You can change port by editing the"
echo "start parms in ${selfname}"
fn_header
fn_details
echo "================================="
echo "Install Complete!"
echo ""
@ -468,8 +531,10 @@ case "$1" in
fn_debugserver;;
email-test)
fn_emailtest;;
details)
fn_details;;
*)
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test}"
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test|details}"
exit 1;;
esac
exit

118
RedOrchestra/roserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 180813
# Version: 310813
#### Variables ####
@ -15,20 +15,20 @@ email="[email protected]"
# Steam login
steamuser="username"
steampass="password"
# Steam
appid="223250"
# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
filesdir="${rootdir}/ro"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/system"
compressedmapsdir="${rootdir}/Maps-Compressed"
# Server names
servicename="ro-server"
gamename="Red Orchestra: Ostfront 41-45"
engine="unreal2"
ini="${servicename}.ini"
servername=`grep -s ServerName= ${systemdir}/${ini} | sed 's/ServerName=//g'`
@ -40,7 +40,7 @@ logdays="7"
# Start vars
defaultmap="RO-Arad.rom"
parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true? -nohomedir ini=${ini} log=${logfile}"
parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir ini=${ini} log=${logfile}"
##### Script #####
# Do not edit
@ -361,6 +361,76 @@ echo "Complete!"
cd ${rootdir}
}
fn_details(){
echo ""
echo "${gamename} Server Details"
echo "============================"
echo ""
echo "${servername} Ports"
echo "======================="
if [ "${engine}" = "unreal2" ];then
gameport=$(grep Port= ${systemdir}/${ini}|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g')
queryport=$((${gameport} + 1))
gsqueryport=$(grep OldQueryPortNumber= ${systemdir}/${ini}|sed 's/\OldQueryPortNumber=//g')
webadminport=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminuser=$(grep AdminName= ${systemdir}/${ini}|sed 's/\AdminName=//g')
webadminpass=$(grep AdminPassword= ${systemdir}/${ini}|sed 's/\AdminPassword=//g')
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT INI VARIABLE"
echo "INBOUND Game Port ${gameport} UDP Port=${gameport}"
echo "INBOUND Query Port ${queryport} UDP n/a"
if [ "${appid}" != "223250" ];then
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
fi
if [ "${appid}" == "215360" ];then
echo "OUTBOUND Master Server port 28852 TCP/UDP n/a"
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
if [ "${appid}" == "223250" ];then
echo "OUTBOUND Steam Port 20610 UDP n/a"
else
echo "OUTBOUND Steam Port 20660 UDP n/a"
fi
fi
echo "INBOUND WebAdmin ${webadminport} TCP ListenPort=${webadminport}"
echo ""
echo "${servername} WebAdmin"
echo "======================="
echo "WebAdmin URL: http://localhost:${webadminport}"
echo "WebAdmin Username: ${webadminuser}"
echo "WebAdmin Password: ${webadminpass}"
echo ""
echo "Config file"
echo "${systemdir}/${ini}"
elif [ "${engine}" = "source" ]||[ "${engine}" = "goldsource" ];then
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/Rcon Port ${port}"
if [ "${engine}" = "source" ];then
echo "INBOUND SourceTV Port ${sourcetvport}"
fi
echo "OUTBOUND Client Port ${clientport}"
echo ""
echo "You can change ports by editing the"
echo "start parameters in ${selfname}"
echo ""
echo "${servername} Details"
echo "======================="
echo "Server name: ${servername}"
echo "Rcon Password: ${rcon}"
echo ""
echo "Config file:"
echo "${servercfg}"
fi
echo ""
}
#
## Installer
#
@ -456,49 +526,43 @@ echo "================================="
* ) echo "Please answer yes or no.";;
esac
done
echo ""
fn_header
echo "Configuring ${gamename} Server"
echo "================================="
sleep 1
echo "Copying ${systemdir}/default.ini to ${systemdir}/${ini}"
cp ${systemdir}/default.ini ${systemdir}/${ini}
sleep 1
echo ""
echo "Creating log directory"
mkdir -v ${logdir}
sleep 1
echo ""
echo "Applying WebAdmin ROOst.css fix!"
echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
sed -i 's/none}/none;/g' ${filesdir}/Web/ServerAdmin/ROOst.css
sed -i 's/underline}/underline;/g' ${filesdir}/Web/ServerAdmin/ROOst.css
sleep 1
echo ""
echo "Applying WebAdmin CharSet fix!"
echo "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1"
sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' ${systemdir}/uweb.int
sleep 1
echo "Setting WebAdmin username and password"
sed -i 's/AdminName=/AdminName=admin/g' ${systemdir}/${ini}
sed -i 's/AdminPassword=/AdminPassword=ropass/g' ${systemdir}/${ini}
sleep 1
echo ""
echo "Enabling WebAdmin"
sed -i 's/bEnabled=False/bEnabled=True/g' ${systemdir}/${ini}
sleep 1
echo ""
cd ${rootdir}
echo "Default Settings"
echo "=============================="
echo "Forcing server to start to get ports/server name to display correctly"
sleep 1
echo "WebAdmin Details:"
echo "Url: http://localhost:8075"
echo "Username: admin"
echo "Password: ropass"
echo ""
echo "Port Details:"
echo "8075 TCP (WebAdmin Port)"
echo "7707 UDP (Game Port)"
echo "7708 UDP (Query Port)"
echo "7717 UDP (GameSpy Query Port)"
echo "28852 TCP & UDP (Allows your Server to Connect to the Master Server Browser)"
echo "20560 UDP (Steam Port)"
cd ${rootdir}
${selfname} start
sleep 5
${selfname} restart
sleep 5
${selfname} stop
sleep 5
fn_header
fn_details
echo "================================="
echo "Install Complete!"
echo ""
@ -531,8 +595,10 @@ case "$1" in
fn_steamguard;;
email-test)
fn_emailtest;;
details)
fn_details;;
*)
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|map-compressor|steam-auth|email-test}"
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|map-compressor|steam-auth|email-test|details}"
exit 1;;
esac
exit

102
TeamFortress2/tf2server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 010813
# Version: 310813
#### Variables ####
@ -27,13 +27,16 @@ appid="232250"
# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
filesdir="${rootdir}/tf2"
filesdir="${rootdir}/serverfiles"
servercfg="${filesdir}/tf/cfg/server.cfg"
# Server names
# Server Details
servicename="tf2-server"
engine="source"
gamename="Team Fortress 2"
engine="source"
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
# Logging
logdir="${rootdir}/log/script"
@ -291,6 +294,76 @@ cd steamcmd
./steamcmd.sh +login anonymous +force_install_dir ${filesdir} +app_update ${appid} validate +quit |tee -a ${logfile}
}
fn_details(){
echo ""
echo "${gamename} Server Details"
echo "============================"
echo ""
echo "${servername} Ports"
echo "======================="
if [ "${engine}" = "unreal2" ];then
gameport=$(grep Port= ${systemdir}/${ini}|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g')
queryport=$((${gameport} + 1))
gsqueryport=$(grep OldQueryPortNumber= ${systemdir}/${ini}|sed 's/\OldQueryPortNumber=//g')
webadminport=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminuser=$(grep AdminName= ${systemdir}/${ini}|sed 's/\AdminName=//g')
webadminpass=$(grep AdminPassword= ${systemdir}/${ini}|sed 's/\AdminPassword=//g')
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT INI VARIABLE"
echo "INBOUND Game Port ${gameport} UDP Port=${gameport}"
echo "INBOUND Query Port ${queryport} UDP n/a"
if [ "${appid}" != "223250" ];then
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
fi
if [ "${appid}" == "215360" ];then
echo "OUTBOUND Master Server port 28852 TCP/UDP n/a"
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
if [ "${appid}" == "223250" ];then
echo "OUTBOUND Steam Port 20610 UDP n/a"
else
echo "OUTBOUND Steam Port 20660 UDP n/a"
fi
fi
echo "INBOUND WebAdmin ${webadminport} TCP ListenPort=${webadminport}"
echo ""
echo "${servername} WebAdmin"
echo "======================="
echo "WebAdmin URL: http://localhost:${webadminport}"
echo "WebAdmin Username: ${webadminuser}"
echo "WebAdmin Password: ${webadminpass}"
echo ""
echo "Config file"
echo "${systemdir}/${ini}"
elif [ "${engine}" = "source" ]||[ "${engine}" = "goldsource" ];then
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/Rcon Port ${port}"
if [ "${engine}" = "source" ];then
echo "INBOUND SourceTV Port ${sourcetvport}"
fi
echo "OUTBOUND Client Port ${clientport}"
echo ""
echo "You can change ports by editing the"
echo "start parameters in ${selfname}"
echo ""
echo "${servername} Details"
echo "======================="
echo "Server name: ${servername}"
echo "Rcon Password: ${rcon}"
echo ""
echo "Config file:"
echo "${servercfg}"
fi
echo ""
}
#
## Installer
#
@ -388,11 +461,11 @@ echo "================================="
* ) echo "Please answer yes or no.";;
esac
done
echo ""
fn_header
echo "Configuring ${gamename} Server"
echo "================================="
read -p "Enter rcon password: " rconpass
read -p "Enter server name: " servername
read -p "Enter rcon password: " rconpass
sleep 1
echo ""
echo "Creating server.cfg"
@ -429,19 +502,8 @@ echo "================================="
mkdir -v ${rootdir}/.steam/sdk32
cp -v ${filesdir}/bin/steamclient.so ${rootdir}/.steam/sdk32/steamclient.so
sleep 1
echo ""
echo "${gamename} Server Details"
echo "================================="
hostname=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Server hostname: ${hostname}"
echo "Rcon password: ${rcon}"
echo "You can edit these in server.cfg:"
echo "${servercfg}"
echo ""
echo "Server IP: localhost:27015"
echo "You can change port by editing the"
echo "start parms in ${selfname}"
fn_header
fn_details
echo "================================="
echo "Install Complete!"
echo ""
@ -469,8 +531,10 @@ case "$1" in
fn_debugserver;;
email-test)
fn_emailtest;;
details)
fn_details;;
*)
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test}"
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|email-test|details}"
exit 1;;
esac
exit

28
UnrealTournament2004/ut2k4server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 300813
# Version: 310813
#### Variables ####
@ -15,7 +15,7 @@ email="[email protected]"
# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
filesdir="${rootdir}/ut2k4"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/System"
compressedmapsdir="${rootdir}/Maps-Compressed"
@ -288,6 +288,7 @@ echo ""
echo "Compressed maps saved to:"
echo ""
echo "$compressedmapsdir"
echo ""
while true; do
read -p "Start compression [y/N]" yn
@ -315,7 +316,7 @@ if [ "${engine}" = "unreal2" ];then
gameport=$(grep Port= ${systemdir}/${ini}|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g')
queryport=$((${gameport} + 1))
gsqueryport=$(grep OldQueryPortNumber= ${systemdir}/${ini}|sed 's/\OldQueryPortNumber=//g')
webadmin=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminport=$(grep ListenPort= ${systemdir}/${ini}|sed 's/\ListenPort=//g')
webadminuser=$(grep AdminName= ${systemdir}/${ini}|sed 's/\AdminName=//g')
webadminpass=$(grep AdminPassword= ${systemdir}/${ini}|sed 's/\AdminPassword=//g')
echo "Ports the server is currently using"
@ -323,34 +324,41 @@ if [ "${engine}" = "unreal2" ];then
echo "DIRECTION DESCRIPTION PORT INI VARIABLE"
echo "INBOUND Game Port ${gameport} UDP Port=${gameport}"
echo "INBOUND Query Port ${queryport} UDP n/a"
if [ "${appid}" != "223250" ];then
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
if [ "${gamename}" == "Killing Floor" ];then
fi
if [ "${appid}" == "215360" ];then
echo "OUTBOUND Master Server port 28852 TCP/UDP n/a"
elif [ "${gamename}" == "Unreal Tournament 2004" ];then
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
if [ "${appid}" == "223250" ];then
echo "OUTBOUND Steam Port 20610 UDP n/a"
else
echo "OUTBOUND Steam Port 20660 UDP n/a"
fi
echo "INBOUND WebAdmin ${webadmin} TCP ListenPort=${webadmin}"
fi
echo "INBOUND WebAdmin ${webadminport} TCP ListenPort=${webadminport}"
echo ""
echo "${servername} WebAdmin"
echo "======================="
echo "WebAdmin URL: http://localhost:${webadmin}"
echo "WebAdmin URL: http://localhost:${webadminport}"
echo "WebAdmin Username: ${webadminuser}"
echo "WebAdmin Password: ${webadminpass}"
echo ""
echo "Config file"
echo "${systemdir}/${ini}"
elif [ "${engine}" = "source" ];then
elif [ "${engine}" = "source" ]||[ "${engine}" = "goldsource" ];then
servername=`grep -s hostname ${servercfg} | sed 's/hostname //g'|sed 's/"//g'`
rcon=`grep -s rcon_password ${servercfg} | sed 's/rcon_password //g'|sed 's/"//g'`
echo "Ports the server is currently using"
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/Rcon Port ${port}"
if [ "${engine}" = "source" ];then
echo "INBOUND SourceTV Port ${sourcetvport}"
fi
echo "OUTBOUND Client Port ${clientport}"
echo ""
echo "You can change ports by editing the"
@ -386,6 +394,7 @@ fn_filesdl(){
echo ""
echo "Downloading Server Files"
echo "============================"
cd ${rootdir}
mkdir ${filesdir}
cd ${filesdir}
@ -474,6 +483,7 @@ while true; do
done
fn_header
fn_filesdl
echo ""
echo "Installing ${gamename} Server"
echo "================================="

Loading…
Cancel
Save