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" diff --git a/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg b/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg index 15906f925..d518c8e0d 100644 --- a/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg +++ b/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg @@ -14,10 +14,18 @@ sv_logecho 1 sv_logfile 1 sv_log_onefile 0 +// Server Hibernation +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 - - - 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 c6ca902e4..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="" @@ -56,7 +61,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 #### 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" 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" } 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/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." 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() 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