Browse Source

Monitor no longer starts server if stop used

If the administrator stops the server using the stop command the monitor
will disable itself preventing the server from starting back up on its
own
pull/103/head
Daniel Gibbs 11 years ago
parent
commit
6b120e2e6c
  1. 15
      CounterStrike/csserver
  2. 15
      CounterStrikeConditionZero/csczserver
  3. 15
      CounterStrikeGlobalOffensive/csgoserver
  4. 15
      CounterStrikeSource/cssserver
  5. 19
      DayOfDefeat/dodserver
  6. 15
      DayOfDefeatSource/dodsserver
  7. 17
      GarrysMod/gmodserver
  8. 18
      HalfLife2Deathmatch/hl2dmserver
  9. 15
      HalfLifeDeathmatchClassic/hldmcserver
  10. 17
      Insurgency/insserver
  11. 13
      KillingFloor/kfserver
  12. 18
      Left4Dead2/l4d2server
  13. 15
      NaturalSelection2/ns2server
  14. 17
      NoMoreRoomInHell/nmrihserver
  15. 13
      RedOrchestra/roserver
  16. 15
      TeamFortress2/tf2server
  17. 15
      TeamFortressClassic/tfcserver
  18. 13
      UnrealTournament2004/ut2k4server
  19. 12
      UnrealTournament99/ut99server

15
CounterStrike/csserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -41,6 +41,7 @@ engine="goldsource"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/cstrike"
executabledir="${filesdir}"
@ -465,6 +466,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -558,6 +565,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -583,6 +592,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -617,7 +628,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

15
CounterStrikeConditionZero/csczserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -41,6 +41,7 @@ engine="goldsource"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/czero"
executabledir="${filesdir}"
@ -465,6 +466,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -558,6 +565,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -583,6 +592,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -617,7 +628,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

15
CounterStrikeGlobalOffensive/csgoserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -59,6 +59,7 @@ engine="source"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/csgo"
executabledir="${filesdir}"
@ -484,6 +485,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -577,6 +584,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -603,6 +612,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -637,7 +648,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

15
CounterStrikeSource/cssserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -42,6 +42,7 @@ engine="source"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/cstrike"
executabledir="${filesdir}"
@ -466,6 +467,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -559,6 +566,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -584,6 +593,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -618,7 +629,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

19
DayOfDefeat/dodserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -41,6 +41,7 @@ engine="goldsource"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/dod"
executabledir="${filesdir}"
@ -253,7 +254,7 @@ else
while true; do
read -p "Do you want to start the server? [y/N]" yn
case $yn in
[Yy]* ) fn_startserver;break;;
[Yy]* ) fn_startserver; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
@ -287,7 +288,7 @@ if [ ${tmuxwc} -eq 1 ]; then
while true; do
read -p "Would you like to stop ${servicename} while running the backup? [y/N]" yn
case $yn in
[Yy]* ) fn_stopserver;break;;
[Yy]* ) fn_stopserver; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
@ -465,6 +466,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -558,6 +565,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -583,6 +592,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -617,7 +628,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

15
DayOfDefeatSource/dodsserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -42,6 +42,7 @@ engine="source"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/dod"
executabledir="${filesdir}"
@ -466,6 +467,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -559,6 +566,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -584,6 +593,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -618,7 +629,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

17
GarrysMod/gmodserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 190614
# Version: 220614
#### Variables ####
@ -22,7 +22,6 @@ maxplayers="16"
port="27015"
sourcetvport="27020"
clientport="27005"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
@ -35,7 +34,6 @@ parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} +clientport ${cli
# Steam
appid="4020"
# Server Details
servicename="gmod-server"
gamename="Garrys's Mod"
@ -44,6 +42,7 @@ engine="source"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/garrysmod"
executabledir="${filesdir}"
@ -468,6 +467,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -561,6 +566,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -586,6 +593,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -620,7 +629,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

18
HalfLife2Deathmatch/hl2dmserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -19,7 +19,6 @@ steampass=""
# Start Variables
defaultmap="dm_lockdown"
maxplayers="16"
tickrate="64"
port="27015"
sourcetvport="27020"
clientport="27005"
@ -27,7 +26,7 @@ ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
parms="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
}
#### Advanced Variables ####
@ -43,6 +42,7 @@ engine="source"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/hl2mp"
executabledir="${filesdir}"
@ -467,6 +467,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -560,6 +566,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -585,6 +593,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -619,7 +629,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

15
HalfLifeDeathmatchClassic/hldmcserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -41,6 +41,7 @@ engine="goldsource"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/valve"
executabledir="${filesdir}"
@ -465,6 +466,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -558,6 +565,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -583,6 +592,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -617,7 +628,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

17
Insurgency/insserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -26,7 +26,7 @@ ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
parms="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
}
#### Advanced Variables ####
@ -42,6 +42,7 @@ engine="source"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/insurgency"
executabledir="${filesdir}"
@ -466,6 +467,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -559,6 +566,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -584,6 +593,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -618,7 +629,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

13
KillingFloor/kfserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -22,6 +22,7 @@ appid="215360"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/System"
executabledir="${systemdir}"
@ -456,6 +457,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -549,6 +556,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -574,6 +583,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1

18
Left4Dead2/l4d2server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -20,13 +20,12 @@ steampass=""
defaultmap="c5m1_waterfront"
maxplayers="8"
port="27015"
sourcetvport="27020"
clientport="27005"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
parms="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
}
#### Advanced Variables ####
@ -42,6 +41,7 @@ engine="source"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/left4dead2"
executabledir="${filesdir}"
@ -466,6 +466,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -559,6 +565,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -584,6 +592,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -618,7 +628,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

15
NaturalSelection2/ns2server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -45,6 +45,7 @@ engine="spark"
# Directories
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${filesdir}"
@ -359,7 +360,7 @@ if [ ! -z "${gamelogdir}" ]; then
echo -e "\n\nServer log\n====================\n" >> "${emaillog}"
tail "${gamelogdir}"/*|grep -v "==>"|sed '/^$/d'|tail -25 >> "${emaillog}"
fi
cat -v "${emaillog}" | mail -s "${subject}" ${email}
mail -s "${subject}" ${email} < "${emaillog}"
fn_printinfo "Sent email notification to ${email}"
sleep 1
echo -en "\n"
@ -461,6 +462,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -554,6 +561,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -579,6 +588,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1

17
NoMoreRoomInHell/nmrihserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -20,13 +20,12 @@ steampass="password"
defaultmap="nmo_broadway"
maxplayers="8"
port="27015"
sourcetvport="27020"
clientport="27005"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
}
#### Advanced Variables ####
@ -466,6 +465,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -559,6 +564,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -584,6 +591,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -618,7 +627,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

13
RedOrchestra/roserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -22,6 +22,7 @@ appid="223250"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/system"
executabledir="${systemdir}"
@ -452,6 +453,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -545,6 +552,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -570,6 +579,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1

15
TeamFortress2/tf2server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -42,6 +42,7 @@ engine="source"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/tf"
executabledir="${filesdir}"
@ -466,6 +467,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -559,6 +566,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -584,6 +593,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -618,7 +629,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

15
TeamFortressClassic/tfcserver

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -41,6 +41,7 @@ engine="goldsource"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/tfc"
executabledir="${filesdir}"
@ -465,6 +466,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -558,6 +565,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -583,6 +592,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1
@ -617,7 +628,7 @@ echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game/RCON port ${port}"
if [ "${engine}" = "source" ]; then
if [ ! -z ${sourcetvport} ]; then
echo "INBOUND SourceTV port ${sourcetvport}"
fi
echo "OUTBOUND Client port ${clientport}"

13
UnrealTournament2004/ut2k4server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -15,6 +15,7 @@ email="[email protected]"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo "${selfname}.lock"|sed 's/^\(.\{1\}\).\(.*\)/\1\2/')
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/System"
executabledir="${systemdir}"
@ -445,6 +446,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -506,6 +513,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -531,6 +540,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1

12
UnrealTournament99/ut99server

@ -3,7 +3,7 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 050214
# Version: 220614
#### Variables ####
@ -445,6 +445,12 @@ fn_monitorserver(){
fn_rootcheck
fn_syscheck
fn_autoip
if [ ! -f ${lockselfname} ]; then
fn_printinfo "Monitoring ${servicename}: No lock file found: Monitor disabled"
sleep 1
echo -en "\n"
exit
fi
fn_printdots "Monitoring ${servicename}: ${servername}"
sleep 1
fn_scriptlog "Monitoring ${servername}"
@ -506,6 +512,8 @@ else
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f ${lockselfname}
sleep 1
echo -en "\n"
}
@ -531,6 +539,8 @@ if [ ${tmuxwc} -eq 1 ]; then
fn_scriptlog "${servername} is already running"
exit
fi
# Create lock file
lockfile -r 0 ${lockselfname}
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'"
sleep 1

Loading…
Cancel
Save