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
This commit is contained in:
Daniel Gibbs 2013-08-31 22:29:01 +01:00
parent 13b01e3a1f
commit 305995fe72
10 changed files with 776 additions and 244 deletions

View File

@ -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@example.com"
# 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"
@ -77,7 +80,7 @@ if [ -f serverquery.py ];then
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} has locked up!" >> ${logfile}
sleep 1
fn_restartserver
else
else
echo -e "[\e[0;32m OK \e[0;39m] Querying ${servicename}: ${servername}: ${serverquery}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Querying ${servername}: ${serverquery}" >> ${logfile}
sleep 1
@ -166,7 +169,7 @@ if [ "${emailnotification}" = "on" ];then
failurereason="Testing ${servicename} email notification"
actiontaken="Sent test email...hello is this thing on?"
fn_emailnotification
else
else
echo -e "[\e[0;31m FAIL \e[0;39m] Email notificaion not enabled"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Email notificaion not enabled" >> ${logfile}
fi
@ -276,7 +279,7 @@ else
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} is currently checking for updates!" >> ${logfile}
echo -e "[\e[0;36m INFO \e[0;39m] ${servicename}: ${servername} will start when updating is complete"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: ${servername} will start when updating is complete" >> ${logfile}
fi
fi
}
fn_updateserver(){
@ -289,8 +292,78 @@ 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
## Installer
#
fn_header(){
@ -311,7 +384,7 @@ cd ${rootdir}
mkdir steamcmd
cd steamcmd
if [ ! -f steam.sh ];then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz
chmod +x steam.sh
@ -352,7 +425,7 @@ echo "Install Directory:"
pwd
echo ""
while true; do
read -p "Continue [y/N]" yn
read -p "Continue [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; return 1 ;;
@ -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
exit

View File

@ -1,9 +1,9 @@
#!/bin/bash
# Counter Strike: Global Offensive
# Counter Strike: Global Offensive
# 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"
@ -79,7 +81,7 @@ if [ -f serverquery.py ];then
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} has locked up!" >> ${logfile}
sleep 1
fn_restartserver
else
else
echo -e "[\e[0;32m OK \e[0;39m] Querying ${servicename}: ${servername}: ${serverquery}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Querying ${servername}: ${serverquery}" >> ${logfile}
sleep 1
@ -168,7 +170,7 @@ if [ "${emailnotification}" = "on" ];then
failurereason="Testing ${servicename} email notification"
actiontaken="Sent test email...hello is this thing on?"
fn_emailnotification
else
else
echo -e "[\e[0;31m FAIL \e[0;39m] Email notificaion not enabled"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Email notificaion not enabled" >> ${logfile}
fi
@ -278,7 +280,7 @@ else
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} is currently checking for updates!" >> ${logfile}
echo -e "[\e[0;36m INFO \e[0;39m] ${servicename}: ${servername} will start when updating is complete"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: ${servername} will start when updating is complete" >> ${logfile}
fi
fi
}
fn_updateserver(){
@ -291,8 +293,78 @@ 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
## Installer
#
fn_header(){
@ -313,7 +385,7 @@ cd ${rootdir}
mkdir steamcmd
cd steamcmd
if [ ! -f steam.sh ];then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz
chmod +x steam.sh
@ -354,7 +426,7 @@ echo "Install Directory:"
pwd
echo ""
while true; do
read -p "Continue [y/N]" yn
read -p "Continue [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; return 1 ;;
@ -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

View File

@ -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"
@ -79,7 +82,7 @@ if [ -f serverquery.py ];then
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} has locked up!" >> ${logfile}
sleep 1
fn_restartserver
else
else
echo -e "[\e[0;32m OK \e[0;39m] Querying ${servicename}: ${servername}: ${serverquery}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Querying ${servername}: ${serverquery}" >> ${logfile}
sleep 1
@ -168,7 +171,7 @@ if [ "${emailnotification}" = "on" ];then
failurereason="Testing ${servicename} email notification"
actiontaken="Sent test email...hello is this thing on?"
fn_emailnotification
else
else
echo -e "[\e[0;31m FAIL \e[0;39m] Email notificaion not enabled"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Email notificaion not enabled" >> ${logfile}
fi
@ -278,7 +281,7 @@ else
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} is currently checking for updates!" >> ${logfile}
echo -e "[\e[0;36m INFO \e[0;39m] ${servicename}: ${servername} will start when updating is complete"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: ${servername} will start when updating is complete" >> ${logfile}
fi
fi
}
fn_updateserver(){
@ -291,8 +294,78 @@ 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
## Installer
#
fn_header(){
@ -313,7 +386,7 @@ cd ${rootdir}
mkdir steamcmd
cd steamcmd
if [ ! -f steam.sh ];then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz
chmod +x steam.sh
@ -354,7 +427,7 @@ echo "Install Directory:"
pwd
echo ""
while true; do
read -p "Continue [y/N]" yn
read -p "Continue [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; return 1 ;;
@ -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

View File

@ -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"
@ -79,7 +81,7 @@ if [ -f serverquery.py ];then
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} has locked up!" >> ${logfile}
sleep 1
fn_restartserver
else
else
echo -e "[\e[0;32m OK \e[0;39m] Querying ${servicename}: ${servername}: ${serverquery}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Querying ${servername}: ${serverquery}" >> ${logfile}
sleep 1
@ -168,7 +170,7 @@ if [ "${emailnotification}" = "on" ];then
failurereason="Testing ${servicename} email notification"
actiontaken="Sent test email...hello is this thing on?"
fn_emailnotification
else
else
echo -e "[\e[0;31m FAIL \e[0;39m] Email notificaion not enabled"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Email notificaion not enabled" >> ${logfile}
fi
@ -278,7 +280,7 @@ else
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} is currently checking for updates!" >> ${logfile}
echo -e "[\e[0;36m INFO \e[0;39m] ${servicename}: ${servername} will start when updating is complete"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: ${servername} will start when updating is complete" >> ${logfile}
fi
fi
}
fn_updateserver(){
@ -291,8 +293,78 @@ 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
## Installer
#
fn_header(){
@ -313,7 +385,7 @@ cd ${rootdir}
mkdir steamcmd
cd steamcmd
if [ ! -f steam.sh ];then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz
chmod +x steam.sh
@ -354,7 +426,7 @@ echo "Install Directory:"
pwd
echo ""
while true; do
read -p "Continue [y/N]" yn
read -p "Continue [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; return 1 ;;
@ -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
exit

View File

@ -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"
@ -79,7 +83,7 @@ if [ -f serverquery.py ];then
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} has locked up!" >> ${logfile}
sleep 1
fn_restartserver
else
else
echo -e "[\e[0;32m OK \e[0;39m] Querying ${servicename}: ${servername}: ${serverquery}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Querying ${servername}: ${serverquery}" >> ${logfile}
sleep 1
@ -168,7 +172,7 @@ if [ "${emailnotification}" = "on" ];then
failurereason="Testing ${servicename} email notification"
actiontaken="Sent test email...hello is this thing on?"
fn_emailnotification
else
else
echo -e "[\e[0;31m FAIL \e[0;39m] Email notificaion not enabled"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Email notificaion not enabled" >> ${logfile}
fi
@ -278,7 +282,7 @@ else
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} is currently checking for updates!" >> ${logfile}
echo -e "[\e[0;36m INFO \e[0;39m] ${servicename}: ${servername} will start when updating is complete"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: ${servername} will start when updating is complete" >> ${logfile}
fi
fi
}
fn_updateserver(){
@ -291,8 +295,78 @@ 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
## Installer
#
fn_header(){
@ -313,7 +387,7 @@ cd ${rootdir}
mkdir steamcmd
cd steamcmd
if [ ! -f steam.sh ];then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz
chmod +x steam.sh
@ -354,7 +428,7 @@ echo "Install Directory:"
pwd
echo ""
while true; do
read -p "Continue [y/N]" yn
read -p "Continue [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; return 1 ;;
@ -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

View File

@ -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"
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
if [ "${gamename}" == "Killing Floor" ];then
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"
elif [ "${gamename}" == "Unreal Tournament 2004" ];then
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
echo "OUTBOUND Steam Port 20660 UDP n/a"
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 ${webadmin} TCP ListenPort=${webadmin}"
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}"
echo "INBOUND SourceTV Port ${sourcetvport}"
if [ "${engine}" = "source" ];then
echo "INBOUND SourceTV Port ${sourcetvport}"
fi
echo "OUTBOUND Client Port ${clientport}"
echo ""
echo "You can change ports by editing the"
@ -426,7 +433,7 @@ echo ""
}
#
##Installer
## Installer
#
fn_header(){
@ -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
@ -536,7 +544,7 @@ echo "================================="
sleep 1
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
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}
@ -588,7 +596,7 @@ case "$1" in
fn_steamguard;;
email-test)
fn_emailtest;;
details)
details)
fn_details;;
*)
echo "Usage: $0 {start|stop|restart|update|monitor|install|debug|map-compressor|steam-auth|email-test|details}"

View File

@ -1,9 +1,9 @@
#!/bin/bash
# Left 4 Dead 2
# Left 4 Dead 2
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 010813
# Version: 310813
#### Variables ####
@ -15,7 +15,9 @@ email="email@example.com"
# 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"
@ -42,8 +45,8 @@ logfiledate="${logdir}/${servicename}-$( date '+%d-%m-%Y-%H-%M-%S').log"
logdays="7"
##### Script #####
# Do not edit
# unless you know
# Do not edit
# unless you know
# what you are doing
fn_rootcheck(){
@ -78,7 +81,7 @@ if [ -f serverquery.py ];then
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} has locked up!" >> ${logfile}
sleep 1
fn_restartserver
else
else
echo -e "[\e[0;32m OK \e[0;39m] Querying ${servicename}: ${servername}: ${serverquery}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Querying ${servername}: ${serverquery}" >> ${logfile}
sleep 1
@ -128,7 +131,7 @@ days=$(( uptime/60/60/24 ))
}
fn_load(){
load=$(uptime | awk -F 'load average' '{ print $2 }')
load=$(uptime | awk -F 'load average' '{ print $2 }')
}
fn_emailnotification(){
@ -138,12 +141,12 @@ fn_load
{
echo -e "=========================================\nServer information\n=========================================\n"
echo -e "Date: $(date)"
echo -e "Distro: ${os}"
echo -e "Distro: ${os}"
echo -e "Arch: ${arch}"
echo -e "Kernel: ${kernel}"
echo -e "Hostname: $HOSTNAME"
echo -e "Uptime: ${days}d, ${hours}h, ${minutes}m"
echo -e "Avg Load${load}\n"
echo -e "Hostname: $HOSTNAME"
echo -e "Uptime: ${days}d, ${hours}h, ${minutes}m"
echo -e "Avg Load${load}\n"
echo -e "=========================================\n${servicename} statistics\n=========================================\n"
echo -e "Service: ${servicename}"
echo -e "Server: ${servername}"
@ -167,7 +170,7 @@ if [ "${emailnotification}" = "on" ];then
failurereason="Testing ${servicename} email notification"
actiontaken="Sent test email...hello is this thing on?"
fn_emailnotification
else
else
echo -e "[\e[0;31m FAIL \e[0;39m] Email notificaion not enabled"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Email notificaion not enabled" >> ${logfile}
fi
@ -277,7 +280,7 @@ else
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} is currently checking for updates!" >> ${logfile}
echo -e "[\e[0;36m INFO \e[0;39m] ${servicename}: ${servername} will start when updating is complete"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: ${servername} will start when updating is complete" >> ${logfile}
fi
fi
}
fn_updateserver(){
@ -290,8 +293,78 @@ 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
## Installer
#
fn_header(){
@ -312,7 +385,7 @@ cd ${rootdir}
mkdir steamcmd
cd steamcmd
if [ ! -f steam.sh ];then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz
chmod +x steam.sh
@ -353,7 +426,7 @@ echo "Install Directory:"
pwd
echo ""
while true; do
read -p "Continue [y/N]" yn
read -p "Continue [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; return 1 ;;
@ -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,25 +502,14 @@ 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 ""
echo "To start server type:"
echo "${selfname} start"
echo ""
echo ""
}
case "$1" in
@ -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

View File

@ -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@example.com"
# 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,8 +361,78 @@ 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
## Installer
#
fn_header(){
@ -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

View File

@ -1,9 +1,9 @@
#!/bin/bash
# Team Fortress 2
# Team Fortress 2
# 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"
@ -79,7 +82,7 @@ if [ -f serverquery.py ];then
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} has locked up!" >> ${logfile}
sleep 1
fn_restartserver
else
else
echo -e "[\e[0;32m OK \e[0;39m] Querying ${servicename}: ${servername}: ${serverquery}"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Querying ${servername}: ${serverquery}" >> ${logfile}
sleep 1
@ -168,7 +171,7 @@ if [ "${emailnotification}" = "on" ];then
failurereason="Testing ${servicename} email notification"
actiontaken="Sent test email...hello is this thing on?"
fn_emailnotification
else
else
echo -e "[\e[0;31m FAIL \e[0;39m] Email notificaion not enabled"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Email notificaion not enabled" >> ${logfile}
fi
@ -278,7 +281,7 @@ else
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Monitor detected ${servername} is currently checking for updates!" >> ${logfile}
echo -e "[\e[0;36m INFO \e[0;39m] ${servicename}: ${servername} will start when updating is complete"
echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: ${servername} will start when updating is complete" >> ${logfile}
fi
fi
}
fn_updateserver(){
@ -291,8 +294,78 @@ 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
## Installer
#
fn_header(){
@ -313,7 +386,7 @@ cd ${rootdir}
mkdir steamcmd
cd steamcmd
if [ ! -f steam.sh ];then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz
chmod +x steam.sh
@ -354,7 +427,7 @@ echo "Install Directory:"
pwd
echo ""
while true; do
read -p "Continue [y/N]" yn
read -p "Continue [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; return 1 ;;
@ -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

View File

@ -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@example.com"
# 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"
echo "INBOUND GameSpy Query Port ${gsqueryport} UDP OldQueryPortNumber=${gsqueryport}"
if [ "${gamename}" == "Killing Floor" ];then
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"
elif [ "${gamename}" == "Unreal Tournament 2004" ];then
else
echo "OUTBOUND Master Server port 28900/28902 TCP/UDP n/a"
fi
if [ "${appid}" ];then
echo "OUTBOUND Steam Port 20660 UDP n/a"
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 ${webadmin} TCP ListenPort=${webadmin}"
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}"
echo "INBOUND SourceTV Port ${sourcetvport}"
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 "================================="