From bab543a24d469c604dbf64047e4aca5e931e58b7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 3 Jun 2019 17:58:54 +0100 Subject: [PATCH 01/27] Create FUNDING.yml --- .github/FUNDING.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..a93e5704d --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,9 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: dgibbs # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +custom: # Replace with a single custom sponsorship URL From e9caaa9dbf64c6a589cecbf35523eb2016af8c7d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 3 Jun 2019 18:01:50 +0100 Subject: [PATCH 02/27] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index a93e5704d..7c0234ea5 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -6,4 +6,4 @@ open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -custom: # Replace with a single custom sponsorship URL +PayPal: https://www.paypal.me/dgibbs64 # Replace with a single custom sponsorship URL From a9116929bd8acb4cdcbd085525a74a180102d055 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 4 Jun 2019 14:26:58 +0100 Subject: [PATCH 03/27] Create issue_label_bot.yaml --- .github/issue_label_bot.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/issue_label_bot.yaml diff --git a/.github/issue_label_bot.yaml b/.github/issue_label_bot.yaml new file mode 100644 index 000000000..ee6d724f1 --- /dev/null +++ b/.github/issue_label_bot.yaml @@ -0,0 +1,4 @@ +label-alias: + bug: 'type: bug' + feature_request: 'type: feature request' + question: 'question' From 5f50c2849dc57763cd4b96546669495ee636d068 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Jun 2019 16:07:15 +0100 Subject: [PATCH 04/27] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 7c0234ea5..269038098 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -6,4 +6,4 @@ open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -PayPal: https://www.paypal.me/dgibbs64 # Replace with a single custom sponsorship URL +other: https://www.paypal.me/dgibbs64 # Replace with a single custom sponsorship URL From 67d0edb02e102ed36db5564f74cd831159be0afa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Jun 2019 16:07:55 +0100 Subject: [PATCH 05/27] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 269038098..62f2cf7a8 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -6,4 +6,4 @@ open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -other: https://www.paypal.me/dgibbs64 # Replace with a single custom sponsorship URL +custom: https://www.paypal.me/dgibbs64 # Replace with a single custom sponsorship URL From c22058fe3b0f9950f1486e2c382eefd11be2b590 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 10 Jun 2019 18:18:12 +0100 Subject: [PATCH 06/27] Update FUNDING.yml --- .github/FUNDING.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 62f2cf7a8..f0900ae1e 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -6,4 +6,8 @@ open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL custom: https://www.paypal.me/dgibbs64 # Replace with a single custom sponsorship URL From 4f44482317aeb4761aff3374780c19f2db9e4ab5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 10 Jun 2019 18:18:40 +0100 Subject: [PATCH 07/27] Update FUNDING.yml --- .github/FUNDING.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index f0900ae1e..d05c374dc 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -9,5 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL custom: https://www.paypal.me/dgibbs64 # Replace with a single custom sponsorship URL From 1fabc013562c1994f68b9b0d2567399798255454 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 17 Jun 2019 00:40:54 +0100 Subject: [PATCH 08/27] feat(newserver): Barotrauma (#2400) Co-authored-by: Yann Kraetzschmann --- .../config-lgsm/btserver/_default.cfg | 137 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/check_system_requirements.sh | 3 + lgsm/functions/command_monitor.sh | 2 +- lgsm/functions/fix_steamcmd.sh | 10 +- lgsm/functions/info_config.sh | 26 ++++ lgsm/functions/info_messages.sh | 13 ++ lgsm/functions/info_parms.sh | 8 + lgsm/functions/install_config.sh | 7 + lgsm/functions/query_gamedig.sh | 2 +- lgsm/functions/query_gsquery.py | 2 +- 11 files changed, 207 insertions(+), 4 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/btserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg new file mode 100644 index 000000000..614269477 --- /dev/null +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -0,0 +1,137 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login +steamuser="username" +steampass='password' + +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" +postdays="7" +posttarget="https://hastebin.com" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring". +# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need +# any custom string in curl - simple ignore this parameter. +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +#### LinuxGSM Advanced Settings #### + +# ANSI Colors +ansi="on" + +# Message Display Time +sleeptime="0.5" + +## SteamCMD Settings +# Server appid +appid="602960" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## LinuxGSM Server Details +# Do not edit +gamename="Barotrauma" +engine="barotrauma" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${serverfiles}" +executabledir="${systemdir}" +executable="./DedicatedServer" +servercfg="serversettings.xml" +servercfgdefault="serversettings.xml" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/ServerLogs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +alertlog="${lgsmlogdir}/${servicename}-alert.log" +postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index b9494bede..b230e225b 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -8,6 +8,7 @@ bmdm,bmdmserver,Black Mesa: Deathmatch bs,bsserver,Blade Symphony bb,bbserver,BrainBread bb2,bb2server,BrainBread 2 +bt,btserver,Barotrauma bt1944,bt1944server,Battalion 1944 cod,codserver,Call of Duty cod2,cod2server,Call of Duty 2 diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh index bc2317f48..1493f6b85 100644 --- a/lgsm/functions/check_system_requirements.sh +++ b/lgsm/functions/check_system_requirements.sh @@ -15,6 +15,9 @@ info_distro.sh if [ "${shortname}" == "ark" ]; then ramrequirementmb="4000" ramrequirementgb="4" +elif [ "${shortname}" == "bt" ]; then + ramrequirementmb="1000" + ramrequirementgb="1" elif [ "${shortname}" == "mh" ]; then ramrequirementmb="4000" ramrequirementgb="4" diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 772be28a9..49cfffbce 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -133,7 +133,7 @@ fn_monitor_check_session(){ fn_monitor_query(){ fn_script_log_info "Querying port: query enabled" # Engines that work with query. - local allowed_engines_array=( avalanche2.0 avalanche3.0 goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 unreal4 wurm ) + local allowed_engines_array=( avalanche2.0 avalanche3.0 barotrauma goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 unreal4 wurm ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "${engine}" ]; then diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index a3f60e89c..eb1622978 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -17,7 +17,15 @@ if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then fn_fix_msg_end fi -if [ "${shortname}" == "ss3" ]; then +if [ "${shortname}" == "bt" ]; then + # Fixes: [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed. + if [ ! -L "${executabledir}/lib64/steamclient.so" ]; then + fixname="steamclient.so x86_64" + fn_fix_msg_start + cp -s -v "${steamcmddir}/linux64/steamclient.so" "${executabledir}/lib64/steamclient.so" >> "${lgsmlog}" + fn_fix_msg_end + fi +elif [ "${shortname}" == "ss3" ]; then # Fixes: .steam/bin32/libsteam.so: cannot open shared object file: No such file or directory if [ ! -f "${HOME}/.steam/bin32/libsteam.so" ]; then fixname="libsteam.so" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 14d77cf9f..275fb54f2 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -110,6 +110,29 @@ fn_info_config_ballistic_overkill(){ fi } +fn_info_config_barotrauma(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + port="${zero}" + queryport="${zero}" + maxplayers="${unavailable}" + else + servername=$(grep -Po 'name="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used + serverpassword=$(grep -Po 'password="\K.*(?=")' "${servercfgfullpath}") # Assuming GNU grep is used + port=$(grep " port=" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$(grep "queryport=" "${servercfgfullpath}" | tr -cd '[:digit:]') + maxplayers=$(grep "maxplayers=" "${servercfgfullpath}" | tr -cd '[:digit:]') + + # Not set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + maxplayers=${maxplayers:-"0"} + fi +} + fn_info_config_battalion1944(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1195,6 +1218,9 @@ if [ "${shortname}" == "ark" ]; then # Ballistic Overkill elif [ "${shortname}" == "bo" ]; then fn_info_config_ballistic_overkill +# Barotrauma +elif [ "${shortname}" == "bt" ]; then + fn_info_config_barotrauma # Battalion 1944 elif [ "${shortname}" == "bt1944" ]; then fn_info_config_battalion1944 diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index d8f7abd63..270caaadd 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1205,6 +1205,17 @@ fn_info_message_mordhau(){ } | column -s $'\t' -t } +fn_info_message_barotrauma(){ + echo "netstat -atunp | grep /./DedicatedSer" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t$((port+1))\tudp" + } | column -s $'\t' -t +} + + fn_info_message_select_engine(){ # Display details depending on game or engine. if [ "${gamename}" == "7 Days To Die" ]; then @@ -1213,6 +1224,8 @@ fn_info_message_select_engine(){ fn_info_message_ark elif [ "${gamename}" == "Ballistic Overkill" ]; then fn_info_message_ballisticoverkill + elif [ "${gamename}" == "Barotrauma" ]; then + fn_info_message_barotrauma elif [ "${gamename}" == "Battalion 1944" ]; then fn_info_message_battalion1944 elif [ "${gamename}" == "Call of Duty" ]; then diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 7b080036d..f21924c92 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -22,6 +22,11 @@ fn_info_parms_ark(){ maxplayers=${maxplayers:-"0"} } +fn_info_parms_barotrauma(){ + port=${port:-"0"} + queryport=${queryport:-"0"} +} + fn_info_parms_realvirtuality(){ port=${port:-"0"} queryport=$((port + 1)) @@ -197,6 +202,9 @@ if [ "${shortname}" == "ark" ]; then # ARMA 3 elif [ "${shortname}" == "arma3" ]; then fn_info_parms_realvirtuality +# Barotrauma +elif [ "${shortname}" == "bt" ]; then + fn_info_parms_barotrauma # Call of Duty elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${engine}" == "iw2.0" ]||[ "${engine}" == "iw3.0" ]; then fn_info_parms_cod diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index b601da7fc..7edad6595 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -173,6 +173,13 @@ elif [ "${gamename}" == "Base Defense" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Barotrauma" ]; then + gamedirname="Barotrauma" + fn_check_cfgdir + array_configs+=( serversettings.xml ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "Battalion 1944" ]; then gamedirname="Battalion1944" fn_check_cfgdir diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 2c6192030..56d55206f 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -14,7 +14,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; local engine="unreal4" fi - local engine_query_array=( avalanche3.0 madness quakelive realvirtuality refractor source goldsource spark starbound unity3d unreal4 wurm ) + local engine_query_array=( avalanche3.0 barotrauma madness quakelive realvirtuality refractor source goldsource spark starbound unity3d unreal4 wurm ) for engine_query in "${engine_query_array[@]}" do if [ "${engine_query}" == "${engine}" ]; then diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py index fe809be15..b02262382 100644 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/functions/query_gsquery.py @@ -17,7 +17,7 @@ class gsquery: self.server_response_timeout = 5 self.default_buffer_length = 1024 # - sourcequery=[ 'avalanche3.0','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d', 'unreal4', 'wurm' ] + sourcequery=[ 'avalanche3.0','barotrauma''madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d', 'unreal4', 'wurm' ] idtech3query=['idtech3','iw3.0','ioquake3'] idtech2query=['idtech2','quake','iw2.0'] minecraftquery=['minecraft','lwjgl2'] From 98287d9515e2fcc8613c2944657a97dd89925536 Mon Sep 17 00:00:00 2001 From: Diego Jara Date: Mon, 17 Jun 2019 15:48:37 -0500 Subject: [PATCH 09/27] feat(mods): add get5 and SteamWorks mods (#2375) Co-authored-by: Diego Jara --- lgsm/functions/mods_core.sh | 40 +++++++++++++++++++++++++++++++++++++ lgsm/functions/mods_list.sh | 18 ++++++++++++++--- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 30e436a53..d2e18d6bf 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -146,6 +146,46 @@ fn_mod_tidy_files_list(){ sed -i "/^addons\/metamod$/d" "${modsdir}/${modcommand}-files.txt" sed -i "/^addons\/metamod\/sourcemod.vdf$/d" "${modsdir}/${modcommand}-files.txt" fi + + # Remove common paths from deletion list (Add your sourcemod mod here) + if [ "${modcommand}" == "gokz" ] || [ "${modcommand}" == "ttt" ] || [ "${modcommand}" == "steamworks" ] || [ "${modcommand}" == "get5" ]; then + sed -i "/^addons\/sourcemod$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/configs$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/extensions$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/logs$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/plugins$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/plugins\/disabled$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/translations$/d" "${modsdir}/${modcommand}-files.txt" + # Don't delete directories of translations like 'fr', 'sv', 'de', etc + sed -i "/^addons\/sourcemod\/translations\/[A-Za-z0-9_]*$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^cfg\/sourcemod$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^maps$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materialss$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/models$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/models\/weapons$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/darkness$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/decals$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^materials\/overlays$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^models$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^models\/weapons$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^sound$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^sound\/weapons$/d" "${modsdir}/${modcommand}-files.txt" + fi + + # Remove paths of specific mods from deletion list + if [ "${modcommand}" == "gokz" ]; then + sed -i "/^addons\/sourcemod\/scripting\/include\/smjansson.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/GlobalAPI-Core.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/sourcebanspp.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/autoexecconfig.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/colorvariables.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/movementapi.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/movement.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/dhooks.inc$/d" "${modsdir}/${modcommand}-files.txt" + sed -i "/^addons\/sourcemod\/scripting\/include\/updater.inc$/d" "${modsdir}/${modcommand}-files.txt" + fi } ## Information Gathering. diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index eb1e2f8bf..c0d240e41 100644 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -26,6 +26,16 @@ sourcemodscrapeurl="https://sm.alliedmods.net/smdrop/${sourcemodmversion}/source sourcemodlatestfile="$(wget "${sourcemodscrapeurl}" -q -O -)" sourcemoddownloadurl="https://www.sourcemod.net/latest.php?os=linux&version=${sourcemodmversion}" sourcemodurl="${sourcemoddownloadurl}" +# Steamworks +steamworksscrapeurl="https://users.alliedmods.net/~kyles/builds/SteamWorks" +steamworkslatestfile="$(curl -sL ${steamworksscrapeurl} | grep -m 1 linux | cut -d '"' -f 4)" +steamworksdownloadurl="${steamworksscrapeurl}/${steamworkslatestfile}" +steamworksurl="${steamworksdownloadurl}" +# CS:GO Mods +get5scrapepath="$(curl -sL https://ci.splewis.net/job/get5/lastSuccessfulBuild/api/xml | grep -oP "\K(.+)(?=)")" +get5latestfile="$(echo "${get5scrapepath}" | xargs -n 1 -I @ sh -c "echo "basename "@""")" +get5downloadurl="https://ci.splewis.net/job/get5/lastSuccessfulBuild/artifact/${get5scrapepath}" +get5url="${get5downloadurl}" # Oxide oxiderustlatestlink="$(curl -sL https://api.github.com/repos/theumod/umod.rust/releases/latest | grep browser_download_url | cut -d '"' -f 4)" oxidehurtworldlatestlink="$(curl -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep "Oxide.Hurtworld.zip")" @@ -59,10 +69,12 @@ modseparator="MOD" # Source mods mod_info_metamod=( MOD "metamod" "MetaMod" "${metamodurl}" "${metamodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/metaplugins.ini;" "source;" "GAMES" "NOTGAMES" "https://www.sourcemm.net" "Plugins Framework" ) mod_info_sourcemod=( MOD "sourcemod" "SourceMod" "${sourcemodurl}" "${sourcemodlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "source;" "GAMES" "NOTGAMES" "http://www.sourcemod.net" "Admin Features (requires MetaMod)" ) +mod_info_steamworks=( MOD "steamworks" "SteamWorks" "${steamworksurl}" "${steamworkslatestfile}" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/KyleSanderson/SteamWorks" "Exposing SteamWorks functions to SourcePawn" ) # CS:GO Mods -mod_info_gokz=( MOD "gokz" "GOKZ" "https://bitbucket.org/kztimerglobalteam/gokz/downloads/GOKZ-latest.zip" "gokz-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter Strike: Global Offensive" "NOTGAMES" "https://bitbucket.org/kztimerglobalteam/gokz/src/master/" "Implements the KZ game mode (requires SourceMod and MetaMod)") -mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodmversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter Strike: Global Offensive" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)") +mod_info_gokz=( MOD "gokz" "GOKZ" "https://bitbucket.org/kztimerglobalteam/gokz/downloads/GOKZ-latest.zip" "gokz-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://bitbucket.org/kztimerglobalteam/gokz/src/master/" "Implements the KZ game mode (requires SourceMod and MetaMod)" ) +mod_info_ttt=( MOD "ttt" "Trouble in Terrorist Town" "https://csgottt.com/downloads/ttt-latest-dev-${sourcemodmversion}.zip" "ttt-latest.zip" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/Bara/TroubleinTerroristTown" "Implements the TTT game mode (requires SourceMod and MetaMod)" ) +mod_info_get5=( MOD "get5" "Get 5" "${get5url}" "${get5latestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "ENGINES" "Counter-Strike: Global Offensive;" "NOTGAMES" "https://github.com/splewis/get5" "Plugin for competitive matches/scrims (requires SourceMod and MetaMod)" ) # Garry's Mod Addons mod_info_ulib=( MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/zip/master" "ulib-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Complete Framework" ) @@ -85,4 +97,4 @@ mod_info_hwoxide=( MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestli mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-7-days-to-die.813/" "Allows for the use of plugins" ) # REQUIRED: Set all mods info into the global array -mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_sourcemod[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" ) +mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" ) From 16bbb21736eff2caaaa48875670382e0998fa4ec Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 17 Jun 2019 22:07:21 +0100 Subject: [PATCH 10/27] correct if for query delay --- lgsm/functions/command_monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 49cfffbce..06786cadd 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -18,7 +18,7 @@ for queryattempt in {1..5}; do fn_print_dots "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_querying_eol fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : QUERYING" - if [ "$(cat "${rootdir}/${lockselfname}")" > "$(date "+%s" -d "${querydelay} mins ago")" ]; then + if [ "$(cat "${rootdir}/${lockselfname}")" -lt "$(date "+%s" -d "${querydelay} mins ago")" ]; then fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_delay_eol fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" From e3a94dccf6670a8acb820a3920f710a3788dfa92 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 17 Jun 2019 22:18:10 +0100 Subject: [PATCH 11/27] correct comment --- lgsm/functions/check_permissions.sh | 2 +- lgsm/functions/command_start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 77dfd1b5b..7108b16c1 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -149,7 +149,7 @@ fn_sys_perm_errors_detect(){ sysdirpermerror="0" classdirpermerror="0" netdirpermerror="0" - # Check permissions/ + # Check permissions. # /sys, /sys/class and /sys/class/net should be readable & executable. if [ ! -r "/sys" ]||[ ! -x "/sys" ]; then sysdirpermerror="1" diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index ed7d98498..afaa82326 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -28,8 +28,8 @@ fn_start_teamspeak3(){ if [ -f "${lgsmlog}" ]; then mv "${lgsmlog}" "${lgsmlogdate}" fi - # Create lockfile. + # Create lockfile. date '+%s' > "${rootdir}/${lockselfname}" # Accept license. if [ ! -f "${executabledir}/.ts3server_license_accepted" ]; then From cd7a62746e76d902e40f15bf5f1176638312bcb0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 18 Jun 2019 22:16:45 +0100 Subject: [PATCH 12/27] release v19.7.0 --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index c549ef46a..aba85f1b0 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v19.6.0" +version="v19.7.0" shortname="core" gameservername="core" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" From af50e2a5c6ae415f1020b1f51471fe7ed1575c0a Mon Sep 17 00:00:00 2001 From: Morbo <14136326+Morb0@users.noreply.github.com> Date: Fri, 21 Jun 2019 02:00:38 +0300 Subject: [PATCH 13/27] feat(barotrauma): Migrate to use dedicated server appid Co-authored-by: Morbo <14136326+Morb0@users.noreply.github.com> --- lgsm/config-default/config-lgsm/btserver/_default.cfg | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index 614269477..ed8650e16 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -8,10 +8,6 @@ #### Server Settings #### -## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login -steamuser="username" -steampass='password' - ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ parms="" @@ -95,7 +91,7 @@ sleeptime="0.5" ## SteamCMD Settings # Server appid -appid="602960" +appid="1026340" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server From 66a260586e17f4b9d24d91226b03c452c7e92ca2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 21 Jun 2019 09:09:22 +0100 Subject: [PATCH 14/27] feat(barotrauma): Migrate to use dedicated server appid (#2404) Co-authored-by: Morbo <14136326+Morb0@users.noreply.github.com> --- lgsm/config-default/config-lgsm/btserver/_default.cfg | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index 614269477..ed8650e16 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -8,10 +8,6 @@ #### Server Settings #### -## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login -steamuser="username" -steampass='password' - ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ parms="" @@ -95,7 +91,7 @@ sleeptime="0.5" ## SteamCMD Settings # Server appid -appid="602960" +appid="1026340" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server From dc931a771866aca1c47d1787a39df072ba4b3845 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 22 Jun 2019 18:34:47 +0200 Subject: [PATCH 15/27] fix(install): fix url in command (#2407) --- lgsm/functions/install_ut2k4_key.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/install_ut2k4_key.sh b/lgsm/functions/install_ut2k4_key.sh index 0f0fe6da5..79066167e 100644 --- a/lgsm/functions/install_ut2k4_key.sh +++ b/lgsm/functions/install_ut2k4_key.sh @@ -14,7 +14,7 @@ echo "=================================" fn_sleep_time echo "To get your server listed on the Master Server list" echo "you must get a free CD key. Get a key here:" -echo "https://forums.unrealtournament.com/utserver/cdkey.php?2004" +echo "https://www.epicgames.com/unrealtournament/forums/cdkey.php?2004" echo "" if [ -z "${autoinstall}" ]; then echo "Once you have the key enter it below" @@ -28,4 +28,4 @@ else echo "You can add your key using the following command" echo "./${selfname} server-cd-key" fi -echo "" \ No newline at end of file +echo "" From 4cc300ba7fe65a15bee29f28e8a25d06d52fb1e5 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 22 Jun 2019 23:46:17 +0200 Subject: [PATCH 16/27] fix(monitor): fix querydelay not delaying (#2406) Co-authored-by: Christian Birk --- lgsm/functions/command_monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 06786cadd..56b8ecf53 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -18,7 +18,7 @@ for queryattempt in {1..5}; do fn_print_dots "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_querying_eol fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : QUERYING" - if [ "$(cat "${rootdir}/${lockselfname}")" -lt "$(date "+%s" -d "${querydelay} mins ago")" ]; then + if [ "$(cat "${rootdir}/${lockselfname}")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_delay_eol fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" From b90623f0058d37023a803a3898084b311819f585 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 22 Jun 2019 23:58:21 +0200 Subject: [PATCH 17/27] fix(install): check if gslt token empty instead of existing (#2408) Co-authored-by: Christian Birk --- lgsm/functions/command_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index c1192a60a..20f0d3445 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -32,7 +32,7 @@ else # Configuration. install_config.sh - if [ -v "${gslt}" ]; then + if [ -z "${gslt}" ]; then install_gslt.sh elif [ "${shortname}" == "dst" ]; then install_dst_token.sh From 0b4479b3803e0c61f2b03c4172a7b4fa34f477f9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 23 Jun 2019 16:33:03 +0100 Subject: [PATCH 18/27] fix(install): correct gslt detection --- lgsm/functions/command_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index 20f0d3445..2bc534d69 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -32,7 +32,7 @@ else # Configuration. install_config.sh - if [ -z "${gslt}" ]; then + if [ -v gslt ]; then install_gslt.sh elif [ "${shortname}" == "dst" ]; then install_dst_token.sh From 0cb92e08c7975edfb1a78399614b440da46aa6e2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 24 Jun 2019 00:27:36 +0100 Subject: [PATCH 19/27] release v19.8.1 --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index aba85f1b0..8baa3d8c8 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v19.7.0" +version="v19.8.1" shortname="core" gameservername="core" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" From a030e95ab74113d06bfbf3a13f1d3c4c9fd5ceae Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 26 Jun 2019 20:29:41 +0100 Subject: [PATCH 20/27] fix(untserver): update appid for Unturned --- lgsm/config-default/config-lgsm/untserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index 2913f0ea8..44c8e40a2 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -102,7 +102,7 @@ sleeptime="0.5" ## SteamCMD Settings # Server appid -appid="304930" +appid="1110390" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server From 4c493d74fc71089a9dd267323fabca5fb89eeb06 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 26 Jun 2019 22:52:14 +0100 Subject: [PATCH 21/27] fix(untserver): Unturned is now x64 --- lgsm/config-default/config-lgsm/untserver/_default.cfg | 2 +- lgsm/functions/fix_unt.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index 44c8e40a2..b65a45510 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -120,7 +120,7 @@ glibc="2.15" ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable="./Unturned_Headless.x86" +executable="./Unturned_Headless.x86_64" servercfgdir="${systemdir}/Servers/${servicename}" servercfg="Config.json" servercfgdefault="Config.json" diff --git a/lgsm/functions/fix_unt.sh b/lgsm/functions/fix_unt.sh index bc29a54ed..3c9c9335a 100644 --- a/lgsm/functions/fix_unt.sh +++ b/lgsm/functions/fix_unt.sh @@ -7,5 +7,5 @@ local commandname="FIX" local commandaction="Fix" -# Fixes: [Raknet] Server Shutting Down (Shutting Down). -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${systemdir}/lib" +# steamclient.so: cannot open shared object file: No such file or directory +export LD_LIBRARY_PATH="${serverfiles}/linux64:${serverfiles}:$LD_LIBRARY_PATH" From b873a83dc3c97a15ad7cd689c859ae2353b1d153 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 26 Jun 2019 22:53:21 +0100 Subject: [PATCH 22/27] fix(linuxgsm.sh): bug causing serverlist.csv to keep downloading --- linuxgsm.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 8baa3d8c8..a1f4af394 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -258,6 +258,15 @@ fn_install_file(){ exit } +fn_dl_serverlist(){ + # Download the latest serverlist. This is the complete list of all supported servers. + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + if [ ! -f "${serverlist}" ]; then + echo "[ FAIL ] serverlist.csv could not be loaded." + exit 1 + fi +} + # Prevent LinuxGSM from running as root. Except if doing a dependency install. if [ "$(whoami)" == "root" ]; then if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then @@ -274,21 +283,16 @@ if [ "$(whoami)" == "root" ]; then fi fi -# Download the latest serverlist. This is the complete list of all supported servers. -fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" -if [ ! -f "${serverlist}" ]; then - echo "[ FAIL ] serverlist.csv could not be loaded." - exit 1 -fi - # LinuxGSM installer mode. if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then + fn_dl_serverlist { tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then + fn_dl_serverlist tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" From 8cdb66850bc1c2420f48926826516e26a07b360a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 26 Jun 2019 22:54:07 +0100 Subject: [PATCH 23/27] hotfix v19.8.3 --- linuxgsm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index a1f4af394..f27794c2c 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v19.8.1" +version="v19.8.3" shortname="core" gameservername="core" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" @@ -292,7 +292,7 @@ if [ "${shortname}" == "core" ]; then } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then - fn_dl_serverlist + fn_dl_serverlist tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" From 320fae5ac22d2e9df378c2e74480be8e8919739a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 26 Jun 2019 23:25:54 +0100 Subject: [PATCH 24/27] fix(untserver): specific steamcmd parameters no longer required --- lgsm/functions/command_validate.sh | 2 -- lgsm/functions/update_steamcmd.sh | 2 -- 2 files changed, 4 deletions(-) diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index de999be25..f6be3f5b6 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -24,8 +24,6 @@ fn_validation(){ if [ "${appid}" == "90" ]; then ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_info_print 70 +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +app_update "${appid}" ${branch} validate +quit | tee -a "${lgsmlog}" - elif [ "${gamename}" == "Unturned" ]; then - ${unbuffer} ./steamcmd.sh +@sSteamCmdForcePlatformBitness 32 +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} validate +quit else ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} validate +quit | tee -a "${lgsmlog}" fi diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 7b690643d..8f27cd3fe 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -20,8 +20,6 @@ fn_update_steamcmd_dl(){ cd "${steamcmddir}" || exit if [ "${appid}" == "90" ]; then ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit | tee -a "${lgsmlog}" - elif [ "${shortname}" == "unt" ]; then - ${unbuffer} ./steamcmd.sh +@sSteamCmdForcePlatformBitness 32 +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} validate +quit else ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${branch} +quit | tee -a "${lgsmlog}" fi From 412f56a2434333b3faabb85a4f0396fe152e20cf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 27 Jun 2019 07:34:02 +0100 Subject: [PATCH 25/27] Revert "fix(linuxgsm.sh): bug causing serverlist.csv to keep downloading" This reverts commit b873a83dc3c97a15ad7cd689c859ae2353b1d153. --- linuxgsm.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index f27794c2c..fd56f849d 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v19.8.3" +version="v19.8.1" shortname="core" gameservername="core" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" @@ -258,15 +258,6 @@ fn_install_file(){ exit } -fn_dl_serverlist(){ - # Download the latest serverlist. This is the complete list of all supported servers. - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" - if [ ! -f "${serverlist}" ]; then - echo "[ FAIL ] serverlist.csv could not be loaded." - exit 1 - fi -} - # Prevent LinuxGSM from running as root. Except if doing a dependency install. if [ "$(whoami)" == "root" ]; then if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then @@ -283,16 +274,21 @@ if [ "$(whoami)" == "root" ]; then fi fi +# Download the latest serverlist. This is the complete list of all supported servers. +fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" +if [ ! -f "${serverlist}" ]; then + echo "[ FAIL ] serverlist.csv could not be loaded." + exit 1 +fi + # LinuxGSM installer mode. if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then - fn_dl_serverlist { tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then - fn_dl_serverlist tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" @@ -382,4 +378,4 @@ else getopt=$1 core_getopt.sh fi -fi +fi \ No newline at end of file From 7f4260e1ac79d00edd77a2bccfd7c882b5c55221 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 29 Jun 2019 01:45:28 +0100 Subject: [PATCH 26/27] fix(linuxgsm.sh): reverted servicename back to selfname --- linuxgsm.sh | 6 +++--- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index fd56f849d..62a810f9d 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,12 +20,12 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v19.8.1" +version="v19.8.4" shortname="core" gameservername="core" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${gameservername}" +servicename="${selfname}" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" @@ -378,4 +378,4 @@ else getopt=$1 core_getopt.sh fi -fi \ No newline at end of file +fi diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index ca4bf150f..de29a27d1 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -26,7 +26,7 @@ shortname="fctr" gameservername="fctrserver" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${gameservername}" +servicename="${selfname}" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index dbcca9b42..065c67f18 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -26,7 +26,7 @@ shortname="jc2" gameservername="jc2server" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${gameservername}" +servicename="${selfname}" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 426851163..4be29da73 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -26,7 +26,7 @@ shortname="mc" gameservername="mcserver" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${gameservername}" +servicename="${selfname}" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index d243ef13e..faeb0e616 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -26,7 +26,7 @@ shortname="ts3" gameservername="ts3server" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -servicename="${gameservername}" +servicename="${selfname}" lockselfname=".${servicename}.lock" lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" From 65d30538533051e655eb2971d2d69b907e2899f2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 29 Jun 2019 02:06:55 +0100 Subject: [PATCH 27/27] fix(linuxgsm.sh): fix bug causing serverlist.csv to keep loading --- linuxgsm.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 62a810f9d..450218cb7 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -58,8 +58,6 @@ core_functions.sh(){ # Bootstrap # Fetches the core functions required before passed off to core_dl.sh. - -# Fetches core functions. fn_bootstrap_fetch_file(){ remote_fileurl="${1}" local_filedir="${2}" @@ -274,15 +272,15 @@ if [ "$(whoami)" == "root" ]; then fi fi -# Download the latest serverlist. This is the complete list of all supported servers. -fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" -if [ ! -f "${serverlist}" ]; then - echo "[ FAIL ] serverlist.csv could not be loaded." - exit 1 -fi - # LinuxGSM installer mode. if [ "${shortname}" == "core" ]; then + # Download the latest serverlist. This is the complete list of all supported servers. + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + if [ ! -f "${serverlist}" ]; then + echo "[ FAIL ] serverlist.csv could not be loaded." + exit 1 + fi + if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then { tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}'