Browse Source

added 2nd query on gsquery to prevent restart

* added 2nd query after delay on gsquery to prevent the script from
restarting during map change
* added +servercfgfile to start parameters to make multiple servers
easier. I will add more documentation on this soon.
pull/63/merge
Daniel Gibbs 11 years ago
parent
commit
f3dd4ef29a
  1. 31
      CounterStrike/csserver
  2. 29
      CounterStrikeConditionZero/csczserver
  3. 31
      CounterStrikeGlobalOffensive/csgoserver
  4. 29
      CounterStrikeSource/cssserver
  5. 29
      DayOfDefeat/dodserver
  6. 31
      DayOfDefeatSource/dodsserver
  7. 31
      HalfLife2Deathmatch/hl2dmserver
  8. 25
      HalfLifeDeathmatchClassic/hldmcserver
  9. BIN
      Insurgency/dependencies/libc.so.6
  10. 33
      Insurgency/insserver
  11. 9
      KillingFloor/kfserver
  12. 34
      Left4Dead2/l4d2server
  13. 9
      NaturalSelection2/ns2server
  14. 31
      NoMoreRoomInHell/nmrihserver
  15. 9
      RedOrchestra/roserver
  16. 31
      TeamFortress2/tf2server
  17. 29
      TeamFortressClassic/tfcserver
  18. 9
      UnrealTournament2004/ut2k4server
  19. 9
      UnrealTournament99/ut99server

31
CounterStrike/csserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -24,7 +24,7 @@ maxplayers="16"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
fn_parms(){
parms="-game cstrike +map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} -maxplayers ${maxplayers}"
parms="-game cstrike +map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} -maxplayers ${maxplayers} +servercfgfile ${servercfg}"
}
#### Advanced Variables ####
@ -44,14 +44,16 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/cstrike"
executabledir="${filesdir}"
executable="./hlds_run"
servercfg="${systemdir}/${servicename}.cfg"
defaultcfg="${systemdir}/server.cfg"
servercfgdir="${systemdir}"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -355,6 +357,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -516,8 +525,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -525,7 +534,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -719,7 +728,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
touch "${systemdir}/listip.cfg"
touch "${systemdir}/banned.cfg"
{
@ -760,7 +769,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

29
CounterStrikeConditionZero/csczserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -44,14 +44,16 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/czero"
executabledir="${filesdir}"
executable="./hlds_run"
servercfg="${systemdir}/${servicename}.cfg"
defaultcfg="${systemdir}/server.cfg"
servercfgdir="${systemdir}"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -355,6 +357,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -516,8 +525,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -525,7 +534,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -729,7 +738,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
touch "${systemdir}/listip.cfg"
touch "${systemdir}/banned.cfg"
{
@ -770,7 +779,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

31
CounterStrikeGlobalOffensive/csgoserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -37,7 +37,7 @@ ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
# https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers#Starting_the_Server
fn_parms(){
parms="-game csgo -usercon +map ${defaultmap} +mapgroup ${mapgroup} +game_mode ${gamemode} +game_type ${gametype} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers}"
parms="-game csgo -usercon +map ${defaultmap} +mapgroup ${mapgroup} +game_mode ${gamemode} +game_type ${gametype} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers} +servercfgfile ${servercfg}"
}
#### Advanced Variables ####
@ -57,14 +57,16 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/csgo"
executabledir="${filesdir}"
executable="./srcds_run"
servercfg="${systemdir}/cfg/${servicename}.cfg"
defaultcfg="${systemdir}/cfg/server.cfg"
servercfgdir="${systemdir}/cfg"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -368,6 +370,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -529,8 +538,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -538,7 +547,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -701,7 +710,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
{
echo -e "// server name"
echo -e "hostname \"${servername}\""
@ -718,7 +727,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

29
CounterStrikeSource/cssserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -45,14 +45,16 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/cstrike"
executabledir="${filesdir}"
executable="./srcds_run"
servercfg="${systemdir}/cfg/${servicename}.cfg"
defaultcfg="${systemdir}/cfg/server.cfg"
servercfgdir="${systemdir}/cfg"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -356,6 +358,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -517,8 +526,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -526,7 +535,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -689,7 +698,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
{
echo -e "// server name"
echo -e "hostname \"${servername}\""
@ -706,7 +715,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

29
DayOfDefeat/dodserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -44,14 +44,16 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/dod"
executabledir="${filesdir}"
executable="./hlds_run"
servercfg="${systemdir}/${servicename}.cfg"
defaultcfg="${systemdir}/server.cfg"
servercfgdir="${systemdir}"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -355,6 +357,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -516,8 +525,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -525,7 +534,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -730,7 +739,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
touch "${systemdir}/listip.cfg"
touch "${systemdir}/banned.cfg"
{
@ -771,7 +780,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

31
DayOfDefeatSource/dodsserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -25,7 +25,7 @@ maxplayers="16"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="-game dod +map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers}"
parms="-game dod +map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers} +servercfgfile ${servercfg}"
}
#### Advanced Variables ####
@ -45,14 +45,16 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/dod"
executabledir="${filesdir}"
executable="./srcds_run"
servercfg="${systemdir}/cfg/${servicename}.cfg"
defaultcfg="${systemdir}/cfg/server.cfg"
servercfgdir="${systemdir}/cfg"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -356,6 +358,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -517,8 +526,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -526,7 +535,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -689,7 +698,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
{
echo -e "// server name"
echo -e "hostname \"${servername}\""
@ -706,7 +715,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

31
HalfLife2Deathmatch/hl2dmserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -25,7 +25,7 @@ maxplayers="16"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="-game hl2mp +map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers}"
parms="-game hl2mp +map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers} +servercfgfile ${servercfg}"
}
#### Advanced Variables ####
@ -45,14 +45,16 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/hl2mp"
executabledir="${filesdir}"
executable="./srcds_run"
servercfg="${systemdir}/cfg/${servicename}.cfg"
defaultcfg="${systemdir}/cfg/server.cfg"
servercfgdir="${systemdir}/cfg"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -356,6 +358,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -517,8 +526,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -526,7 +535,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -689,7 +698,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
{
echo -e "// server name"
echo -e "hostname \"${servername}\""
@ -706,7 +715,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

25
HalfLifeDeathmatchClassic/hldmcserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -44,8 +44,10 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/valve"
executabledir="${filesdir}"
executable="./hlds_run"
servercfg="${systemdir}/${servicename}.cfg"
defaultcfg="${systemdir}/server.cfg"
servercfgdir="${systemdir}"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
@ -355,6 +357,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -516,8 +525,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -525,7 +534,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -719,7 +728,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
touch "${systemdir}/listip.cfg"
touch "${systemdir}/banned.cfg"
{
@ -760,7 +769,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

BIN
Insurgency/dependencies/libc.so.6

Binary file not shown.

33
Insurgency/insserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -25,7 +25,7 @@ maxplayers="24"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="+map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers}"
parms="+map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers} +servercfgfile ${servercfg}"
}
#### Advanced Variables ####
@ -44,15 +44,17 @@ selfname="$0"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/insurgency"
executabledir="${filesdir}"
executable="./srcds_linux"
servercfg="${systemdir}/cfg/${servicename}.cfg"
defaultcfg="${systemdir}/cfg/server.cfg"
executable="./srcds_run"
servercfgdir="${systemdir}/cfg"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -356,6 +358,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -517,8 +526,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -526,7 +535,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -689,7 +698,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
{
echo -e "// server name"
echo -e "hostname \"${servername}\""
@ -706,7 +715,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

9
KillingFloor/kfserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -349,6 +349,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"

34
Left4Dead2/l4d2server

@ -3,8 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 251214
# Version: 240114
# Version: 010214
#### Variables ####
@ -22,11 +21,11 @@ defaultmap="c5m1_waterfront"
port="27015"
sourcetvport="27020"
clientport="27005"
maxplayers="16"
maxplayers="8"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="-game left4dead2 +map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers}"
parms="-game left4dead2 +map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers} +servercfgfile ${servercfg}"
}
#### Advanced Variables ####
@ -46,14 +45,16 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/left4dead2"
executabledir="${filesdir}"
executable="./srcds_run"
servercfg="${systemdir}/cfg/${servicename}.cfg"
defaultcfg="${systemdir}/cfg/server.cfg"
servercfgdir="${systemdir}/cfg"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -357,6 +358,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -518,8 +526,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -527,7 +535,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -690,7 +698,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
{
echo -e "// server name"
echo -e "hostname \"${servername}\""
@ -707,7 +715,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

9
NaturalSelection2/ns2server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -352,6 +352,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"

31
NoMoreRoomInHell/nmrihserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -25,7 +25,7 @@ maxplayers="8"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="+map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers}"
parms="+map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers} +servercfgfile ${servercfg}"
}
#### Advanced Variables ####
@ -45,14 +45,16 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/nmrih"
executabledir="${filesdir}/srcds"
executable="./srcds_nmrih"
servercfg="${systemdir}/cfg/${servicename}.cfg"
defaultcfg="${systemdir}/cfg/server.cfg"
servercfgdir="${systemdir}/cfg"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -356,6 +358,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -517,8 +526,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -526,7 +535,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -700,7 +709,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
{
echo -e "// server name"
echo -e "hostname \"${servername}\""
@ -717,7 +726,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

9
RedOrchestra/roserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -345,6 +345,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"

31
TeamFortress2/tf2server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -25,7 +25,7 @@ maxplayers="16"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="-game tf +map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers}"
parms="-game tf +map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers} +servercfgfile ${servercfg}"
}
#### Advanced Variables ####
@ -45,14 +45,16 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/tf"
executabledir="${filesdir}"
executable="./srcds_run"
servercfg="${systemdir}/cfg/${servicename}.cfg"
defaultcfg="${systemdir}/cfg/server.cfg"
servercfgdir="${systemdir}/cfg"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -356,6 +358,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -517,8 +526,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -526,7 +535,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -689,7 +698,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
{
echo -e "// server name"
echo -e "hostname \"${servername}\""
@ -706,7 +715,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

29
TeamFortressClassic/tfcserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -44,14 +44,16 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/tfc"
executabledir="${filesdir}"
executable="./hlds_run"
servercfg="${systemdir}/${servicename}.cfg"
defaultcfg="${systemdir}/server.cfg"
servercfgdir="${systemdir}"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
# Logging
logdays="7"
@ -355,6 +357,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"
@ -516,8 +525,8 @@ echo -en "\n"
fn_details(){
fn_autoip
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')
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -525,7 +534,7 @@ echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "RCON password: ${rcon}"
echo "Config file: ${servercfg}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "${servername} Ports"
echo "============================"
@ -729,7 +738,7 @@ echo "================================="
echo "exec ${servicename}.cfg" > "${defaultcfg}"
sleep 1
echo "Creating ${servicename}.cfg config file."
touch "${servercfg}"
touch "${servercfgfullpath}"
touch "${systemdir}/listip.cfg"
touch "${systemdir}/banned.cfg"
{
@ -770,7 +779,7 @@ echo "================================="
echo -e "sv_logecho 1"
echo -e "sv_logfile 1"
echo -e "sv_log_onefile 0"
}|tee "${servercfg}" > /dev/null 2>&1
}|tee "${servercfgfullpath}" > /dev/null 2>&1
sleep 1
echo ""
fn_header

9
UnrealTournament2004/ut2k4server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -344,6 +344,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"

9
UnrealTournament99/ut99server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 240114
# Version: 010214
#### Variables ####
@ -338,6 +338,13 @@ if [ -f gsquery.py ]; then
fn_scriptlog "Querying port: ${ip}:${port}: ${serverquery}"
sleep 1
echo -en "\n"
if [[ -z "${secondquery}" ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0;39m] Monitoring ${servicename}: Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
secondquery=1
fn_serverquery
fi
if [ "${emailnotification}" = "on" ]; then
subject="${servicename} Monitor - Starting ${servername}"
failurereason="Failed to query ${servicename}: ${serverquery}"

Loading…
Cancel
Save