From 83492ed57cf665f762162d9fb1c2994d1cdc7df9 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 2 Aug 2016 03:54:28 +0200 Subject: [PATCH 1/9] Imrpoved server hibernation over default one --- CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg b/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg index 15906f925..2d253dbcc 100644 --- a/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg +++ b/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg @@ -14,6 +14,10 @@ sv_logecho 1 sv_logfile 1 sv_log_onefile 0 +// Server Hibernation +sv_hibernate_when_empty 1 +sv_hibernate_ms 5 + exec banned_user.cfg exec banned_ip.cfg writeid From 0c2bbe007586d0bb3aade99162ac1360cffdcbe9 Mon Sep 17 00:00:00 2001 From: Scarsz Date: Mon, 1 Aug 2016 23:26:47 -0700 Subject: [PATCH 2/9] Missing portion of opt --- lgsm/functions/core_getopt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 47cfbf1a7..f7c566d7f 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -234,7 +234,7 @@ case "${getopt}" in echo -e "${blue}start\t${default}st |Start the server." echo -e "${blue}stop\t${default}sp |Stop the server." echo -e "${blue}restart\t${default}r |Restart the server." - echo -e "${blue}update\t${default}Checks and applies updates from SteamCMD." + echo -e "${blue}update\t${default}u |Checks and applies updates from SteamCMD." echo -e "${blue}force-update\t${default}fu |Bypasses the check and applies updates from SteamCMD." echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded." echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD." From 4d7be97ba0c0cf7156fff24dc2d9c519f0fa17be Mon Sep 17 00:00:00 2001 From: Scarsz Date: Mon, 1 Aug 2016 23:44:11 -0700 Subject: [PATCH 3/9] Characters --- lgsm/functions/command_fastdl.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index a0bb581e7..71a2ecff5 100644 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -305,15 +305,15 @@ fn_fastdl_bzip2(){ fn_fastdl_completed(){ # Finished message echo "" - fn_print_ok "Congratulations, it's done !" + fn_print_ok "Congratulations, it's done!" fn_script_log "FastDL job done" sleep 2 echo -en "\n" echo "" - fn_print_info "Need more doc ? See https://github.com/dgibbs64/linuxgsm/wiki/FastDL" + fn_print_info "Need more documentation? See https://github.com/dgibbs64/linuxgsm/wiki/FastDL" echo -en "\n" if [ "$bzip2installed" == "0" ]; then - echo "By the way, you'd better install bzip2 an re-run this command !" + echo "By the way, you'd better install bzip2 and re-run this command!" fi echo "Credits : UltimateByte" } From 53f502ad88a854affbc3ca349d0aeaf7fea05d99 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 2 Aug 2016 14:13:48 +0200 Subject: [PATCH 4/9] Compatibility with python 3.x "A prefix of 'b' or 'B' is ignored in Python 2; it indicates that the literal should become a bytes literal in Python 3 (e.g. when code is automatically converted with 2to3). A 'u' or 'b' prefix may be followed by an 'r' prefix." "Bytes literals are always prefixed with 'b' or 'B'; they produce an instance of the bytes type instead of the str type. They may only contain ASCII characters; bytes with a numeric value of 128 or greater must be expressed with escapes." --- lgsm/functions/gsquery.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lgsm/functions/gsquery.py b/lgsm/functions/gsquery.py index 8102e28a7..76d5478d9 100644 --- a/lgsm/functions/gsquery.py +++ b/lgsm/functions/gsquery.py @@ -18,23 +18,23 @@ class GameServer: self.default_buffer_length = 1024 # if self.option.engine == 'source': - self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' + self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'goldsource': - self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' + self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'spark': - self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' + self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'realvirtuality': - self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' + self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'unity3d': self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'idtech3': - self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' + self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'unreal': - self.query_prompt_string = '\x5C\x69\x6E\x66\x6F\x5C' + self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C' elif self.option.engine == 'unreal2': - self.query_prompt_string = '\x79\x00\x00\x00\x00' + self.query_prompt_string = b'\x79\x00\x00\x00\x00' elif self.option.engine == 'avalanche': - self.query_prompt_string = '\xFE\xFD\x09\x10\x20\x30\x40' + self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40' self.connected = False self.response = None self.sanity_checks() From cc4d103dad9505d0ed12813e16d4d95461df0064 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 2 Aug 2016 14:28:14 +0200 Subject: [PATCH 5/9] Allow Server Querying --- CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg b/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg index 2d253dbcc..d518c8e0d 100644 --- a/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg +++ b/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg @@ -18,10 +18,14 @@ sv_log_onefile 0 sv_hibernate_when_empty 1 sv_hibernate_ms 5 +// Server Query +// More info at: https://www.gametracker.com/games/csgo/forum.php?thread=91691 +host_name_store 1 +host_info_show 1 +host_players_show 2 + + exec banned_user.cfg exec banned_ip.cfg writeid writeip - - - From dd12d4a5b47829e8cbd7130370eb697d40b37b02 Mon Sep 17 00:00:00 2001 From: Noel Benzinger Date: Wed, 3 Aug 2016 15:09:05 -0500 Subject: [PATCH 6/9] Update gmodserver: Missing $ in front of tickrate in parms --- GarrysMod/gmodserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index c6ca902e4..e15fcf4e5 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -56,7 +56,7 @@ gslt="" # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ -parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate {tickrate} +host_workshop_collection ${workshopcollectionid} -authkey ${workshopauth} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} ${customparms}" +parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickrate} +host_workshop_collection ${workshopcollectionid} -authkey ${workshopauth} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} ${customparms}" } #### Advanced Variables #### From 458ea8ffdf9c0aba2a4cb1a58a7bc778c44e48c9 Mon Sep 17 00:00:00 2001 From: GhoulofGSG9 Date: Fri, 5 Aug 2016 20:19:25 +0200 Subject: [PATCH 7/9] Fixed that the steam branch parameter wasn't used in various places. --- lgsm/functions/command_validate.sh | 4 ++-- lgsm/functions/install_server_files.sh | 6 +++--- lgsm/functions/update_steamcmd.sh | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 948b11ee3..65b68dad5 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -24,9 +24,9 @@ fn_validation(){ fi if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" +app_update "${appid}" validate +quit| tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" validate +quit| tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" fi if [ $? != 0 ]; then fn_print_fail_nl "Validating files: SteamCMD" diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 946b1c6d9..8f05a01a8 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -56,7 +56,7 @@ fn_install_server_files_steamcmd(){ ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit local exitcode=$? else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit local exitcode=$? fi elif [ "${counter}" -ge "5" ]; then @@ -64,7 +64,7 @@ fn_install_server_files_steamcmd(){ ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit local exitcode=$? else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} -validate +quit local exitcode=$? fi fi @@ -82,7 +82,7 @@ fn_install_server_files_steamcmd(){ counter="0" while [ "${counter}" -le "4" ]; do counter=$((counter+1)) - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} -validate +quit local exitcode=$? done fi diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 5a097aaaf..574fbe2b9 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -24,9 +24,9 @@ fn_update_steamcmd_dl(){ fi if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" +quit | tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit | tee -a "${scriptlog}" + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" fi fix.sh From 9abe209f6155b32c00e6c992c4b34d611f7906a9 Mon Sep 17 00:00:00 2001 From: GhoulofGSG9 Date: Fri, 5 Aug 2016 20:26:54 +0200 Subject: [PATCH 8/9] Added the branch parameter to game script with popular branches --- CounterStrikeGlobalOffensive/csgoserver | 5 +++++ GarrysMod/gmodserver | 5 +++++ NaturalSelection2/ns2server | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index 6dd95fcb7..413f896a0 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -78,6 +78,11 @@ githubbranch="master" # Steam appid="740" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta 1.35.4.4" +branch="" + # Server Details servicename="csgo-server" gamename="Counter Strike: Global Offensive" diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index e15fcf4e5..9eb3be966 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -29,6 +29,11 @@ pushbullettoken="accesstoken" steamuser="anonymous" steampass="" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta prerelease " +branch="" + # Workshop Variables # http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers workshopauth="" diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server index 70f4e7fd5..3c1cc3186 100644 --- a/NaturalSelection2/ns2server +++ b/NaturalSelection2/ns2server @@ -62,6 +62,11 @@ githubbranch="master" # Steam appid="4940" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta beta" +branch="" + # Server Details servicename="ns2-server" gamename="Natural Selection 2" From 220a720790d71477da8a9abd38ccae0eba339069 Mon Sep 17 00:00:00 2001 From: Marvin Lehmann Date: Sat, 6 Aug 2016 01:04:52 +0200 Subject: [PATCH 9/9] Fixed servercfgdir --- CounterStrike/csserver | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CounterStrike/csserver b/CounterStrike/csserver index b03f7bcf2..7b942ee32 100644 --- a/CounterStrike/csserver +++ b/CounterStrike/csserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="210516" +version="060816" #### Variables #### @@ -71,7 +71,7 @@ systemdir="${filesdir}/cstrike" executabledir="${filesdir}" executable="./hlds_run" servercfg="${servicename}.cfg" -servercfgdir="${systemdir}/cfg" +servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups"