From 83587560ab256ff3d572e2a93647374f022587eb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Aug 2014 21:27:36 +0100 Subject: [PATCH] improved console logging improved console logging so now does not require you to press return to output the console to a log file --- CounterStrikeGlobalOffensive/csgoserver | 5 +++-- CounterStrikeSource/cssserver | 5 +++-- DayOfDefeatSource/dodsserver | 5 +++-- FistfulOfFrags/fofserver | 5 +++-- GarrysMod/gmodserver | 7 ++++--- HalfLife2Deathmatch/hl2dmserver | 7 ++++--- Insurgency/insserver | 5 +++-- KillingFloor/kfserver | 5 +++-- Left4Dead/l4dserver | 10 +++++----- Left4Dead2/l4d2server | 5 +++-- NaturalSelection2/ns2server | 14 ++++++++++---- NoMoreRoomInHell/nmrihserver | 5 +++-- RedOrchestra/roserver | 5 +++-- TeamFortress2/tf2server | 7 ++++--- UnrealTournament2004/ut2k4server | 5 +++-- UnrealTournament99/ut99server | 5 +++-- 16 files changed, 60 insertions(+), 40 deletions(-) diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index b09245478..50e8357e3 100644 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -615,7 +615,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then diff --git a/CounterStrikeSource/cssserver b/CounterStrikeSource/cssserver index 0234ec6b2..550af66ad 100644 --- a/CounterStrikeSource/cssserver +++ b/CounterStrikeSource/cssserver @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -596,7 +596,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then diff --git a/DayOfDefeatSource/dodsserver b/DayOfDefeatSource/dodsserver index c37ebbc4a..a763497ce 100644 --- a/DayOfDefeatSource/dodsserver +++ b/DayOfDefeatSource/dodsserver @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -596,7 +596,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then diff --git a/FistfulOfFrags/fofserver b/FistfulOfFrags/fofserver index 4b447e3b1..dc3eb1a46 100644 --- a/FistfulOfFrags/fofserver +++ b/FistfulOfFrags/fofserver @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -596,7 +596,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index 97625a416..9943b0d50 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -601,7 +601,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then @@ -938,4 +939,4 @@ case "$1" in echo "Usage: $0 {start|stop|restart|update|update-restart|validate|validate-restart|monitor|email-test|details|backup|console|debug|install}" exit 1;; esac -exit +exit \ No newline at end of file diff --git a/HalfLife2Deathmatch/hl2dmserver b/HalfLife2Deathmatch/hl2dmserver index a3703a0be..37663bec3 100644 --- a/HalfLife2Deathmatch/hl2dmserver +++ b/HalfLife2Deathmatch/hl2dmserver @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -594,9 +594,10 @@ if [ ${tmuxwc} -eq 1 ]; then exit fi # Create lock file -ldate > ${lockselfname} +date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then diff --git a/Insurgency/insserver b/Insurgency/insserver index c672645c9..b6fa68508 100644 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -596,7 +596,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then diff --git a/KillingFloor/kfserver b/KillingFloor/kfserver index 5cd4dcc28..d796dee81 100644 --- a/KillingFloor/kfserver +++ b/KillingFloor/kfserver @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -586,7 +586,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then diff --git a/Left4Dead/l4dserver b/Left4Dead/l4dserver index 00b982aba..64973aea2 100644 --- a/Left4Dead/l4dserver +++ b/Left4Dead/l4dserver @@ -22,13 +22,12 @@ steampass="" defaultmap="l4d_hospital01_apartment" 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 left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } #### Advanced Variables #### @@ -598,7 +597,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then @@ -656,8 +656,8 @@ clear echo "=================================" echo "${gamename}" echo "Linux Game Server Manager" -echo "by Summit Singh Thakur" -echo "http://www.summit.im" +echo "by Daniel Gibbs" +echo "http://danielgibbs.co.uk" echo "=================================" echo "" } diff --git a/Left4Dead2/l4d2server b/Left4Dead2/l4d2server index 5f8288768..8aca2b63f 100644 --- a/Left4Dead2/l4d2server +++ b/Left4Dead2/l4d2server @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -595,7 +595,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server index 3077427d0..2c35d6167 100644 --- a/NaturalSelection2/ns2server +++ b/NaturalSelection2/ns2server @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -591,7 +591,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then @@ -646,11 +647,16 @@ echo "" # fn_ns2deps(){ -echo "Downloading libm.so.6 and libstdc++.so.6" +echo "Downloading libm.so.6" echo "=================================" cd "${filesdir}" wget https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libm.so.6 -wget https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libstdc++.so.6 +sleep 1 +echo "" +echo "Copying libstdc++.so.6" +echo "=================================" +cd "${filesdir}" +cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}" sleep 1 echo "" } diff --git a/NoMoreRoomInHell/nmrihserver b/NoMoreRoomInHell/nmrihserver index 95f976044..cf2b4283b 100644 --- a/NoMoreRoomInHell/nmrihserver +++ b/NoMoreRoomInHell/nmrihserver @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -595,7 +595,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then diff --git a/RedOrchestra/roserver b/RedOrchestra/roserver index 21b12d4de..c070e339a 100644 --- a/RedOrchestra/roserver +++ b/RedOrchestra/roserver @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -582,7 +582,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then diff --git a/TeamFortress2/tf2server b/TeamFortress2/tf2server index 76b62bc01..0e74f9497 100644 --- a/TeamFortress2/tf2server +++ b/TeamFortress2/tf2server @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -596,7 +596,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then @@ -853,4 +854,4 @@ case "$1" in echo "Usage: $0 {start|stop|restart|update|update-restart|validate|validate-restart|monitor|email-test|details|backup|console|debug|install}" exit 1;; esac -exit +exit \ No newline at end of file diff --git a/UnrealTournament2004/ut2k4server b/UnrealTournament2004/ut2k4server index 7c6791916..6a5150cdf 100644 --- a/UnrealTournament2004/ut2k4server +++ b/UnrealTournament2004/ut2k4server @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -543,7 +543,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then diff --git a/UnrealTournament99/ut99server b/UnrealTournament99/ut99server index 1142cb757..b7e2570b2 100644 --- a/UnrealTournament99/ut99server +++ b/UnrealTournament99/ut99server @@ -3,7 +3,7 @@ # Server Management Script # Author: Daniel Gibbs # Website: http://danielgibbs.co.uk -# Version: 010814 +# Version: 050814 #### Variables #### @@ -542,7 +542,8 @@ fi # Create lock file date > ${lockselfname} cd "${executabledir}" -tmux new-session -d -s ${servicename} "${executable} ${parms}|tee -a '${consolelog}'" +tmux new-session -d -s ${servicename} "${executable} ${parms}" +tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" sleep 1 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) if [ ${tmuxwc} -eq 0 ]; then