From 88ff70bf32eccea57d2ad7e1872186a40841c4c4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 20 Apr 2020 11:32:44 +0100 Subject: [PATCH 01/96] remove duplicate code --- lgsm/functions/fix_wurm.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/lgsm/functions/fix_wurm.sh b/lgsm/functions/fix_wurm.sh index 8ee907103..79babb65e 100644 --- a/lgsm/functions/fix_wurm.sh +++ b/lgsm/functions/fix_wurm.sh @@ -7,9 +7,6 @@ local modulename="FIX" local commandaction="Fix" -local modulename="FIX" -local commandaction="Fix" - # Copies steamclient.so to correct location. if [ ! -f "${serverfiles}/nativelibs" ]; then cp -f "${serverfiles}/linux64/steamclient.so" "${serverfiles}/nativelibs" From 7ef53a5bb20f710edc0868ed3fc8d9a0bf1a358f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 20 Apr 2020 13:41:30 +0100 Subject: [PATCH 02/96] corrected short response error code --- lgsm/functions/query_gsquery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py index 8df1474a1..fea94dc6b 100644 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/functions/query_gsquery.py @@ -84,8 +84,8 @@ class gsquery: # Response. if self.response is None: self.fatal_error('No response', 3) - if len(self.response) < 2: - sys.exit('Short response.', 5) + if len(self.response) < 5: + sys.exit('Short response.', 3) else: self.exit_success(str(self.response)) From 2f9800e13c324494df96b711c6151e0a56dfd0f9 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 22 Apr 2020 23:12:47 +0200 Subject: [PATCH 03/96] feat(newserver): Avorion (#2476) Co-authored-by: Daniel Gibbs --- .../config-lgsm/acserver/_default.cfg | 2 +- .../config-lgsm/ahl2server/_default.cfg | 2 +- .../config-lgsm/ahlserver/_default.cfg | 2 +- .../config-lgsm/arkserver/_default.cfg | 2 +- .../config-lgsm/arma3server/_default.cfg | 2 +- .../config-lgsm/avserver/_default.cfg | 173 ++++++++++++++++++ .../config-lgsm/bb2server/_default.cfg | 2 +- .../config-lgsm/bbserver/_default.cfg | 2 +- .../config-lgsm/bdserver/_default.cfg | 2 +- .../config-lgsm/bf1942server/_default.cfg | 2 +- .../config-lgsm/bmdmserver/_default.cfg | 2 +- .../config-lgsm/boserver/_default.cfg | 2 +- .../config-lgsm/bsserver/_default.cfg | 2 +- .../config-lgsm/bt1944server/_default.cfg | 2 +- .../config-lgsm/btserver/_default.cfg | 2 +- .../config-lgsm/ccserver/_default.cfg | 2 +- .../config-lgsm/cod2server/_default.cfg | 2 +- .../config-lgsm/cod4server/_default.cfg | 2 +- .../config-lgsm/codserver/_default.cfg | 2 +- .../config-lgsm/coduoserver/_default.cfg | 2 +- .../config-lgsm/codwawserver/_default.cfg | 2 +- .../config-lgsm/csczserver/_default.cfg | 2 +- .../config-lgsm/csgoserver/_default.cfg | 2 +- .../config-lgsm/csserver/_default.cfg | 2 +- .../config-lgsm/cssserver/_default.cfg | 2 +- .../config-lgsm/dabserver/_default.cfg | 2 +- .../config-lgsm/dmcserver/_default.cfg | 2 +- .../config-lgsm/dodserver/_default.cfg | 2 +- .../config-lgsm/dodsserver/_default.cfg | 2 +- .../config-lgsm/doiserver/_default.cfg | 2 +- .../config-lgsm/dstserver/_default.cfg | 2 +- .../config-lgsm/dysserver/_default.cfg | 2 +- .../config-lgsm/ecoserver/_default.cfg | 2 +- .../config-lgsm/emserver/_default.cfg | 2 +- .../config-lgsm/etlserver/_default.cfg | 2 +- .../config-lgsm/fctrserver/_default.cfg | 2 +- .../config-lgsm/fofserver/_default.cfg | 2 +- .../config-lgsm/gesserver/_default.cfg | 2 +- .../config-lgsm/gmodserver/_default.cfg | 2 +- .../config-lgsm/hl2dmserver/_default.cfg | 2 +- .../config-lgsm/hldmserver/_default.cfg | 2 +- .../config-lgsm/hldmsserver/_default.cfg | 2 +- .../config-lgsm/hwserver/_default.cfg | 2 +- .../config-lgsm/insserver/_default.cfg | 2 +- .../config-lgsm/inssserver/_default.cfg | 2 +- .../config-lgsm/iosserver/_default.cfg | 2 +- .../config-lgsm/jc2server/_default.cfg | 2 +- .../config-lgsm/jc3server/_default.cfg | 2 +- .../config-lgsm/kf2server/_default.cfg | 2 +- .../config-lgsm/kfserver/_default.cfg | 2 +- .../config-lgsm/l4d2server/_default.cfg | 2 +- .../config-lgsm/l4dserver/_default.cfg | 2 +- .../config-lgsm/mcbserver/_default.cfg | 2 +- .../config-lgsm/mcserver/_default.cfg | 2 +- .../config-lgsm/mhserver/_default.cfg | 2 +- .../config-lgsm/mohaaserver/_default.cfg | 2 +- .../config-lgsm/mtaserver/_default.cfg | 2 +- .../config-lgsm/mumbleserver/_default.cfg | 2 +- .../config-lgsm/ndserver/_default.cfg | 2 +- .../config-lgsm/nmrihserver/_default.cfg | 2 +- .../config-lgsm/ns2cserver/_default.cfg | 2 +- .../config-lgsm/ns2server/_default.cfg | 2 +- .../config-lgsm/nsserver/_default.cfg | 2 +- .../config-lgsm/onsetserver/_default.cfg | 2 +- .../config-lgsm/opforserver/_default.cfg | 2 +- .../config-lgsm/pcserver/_default.cfg | 2 +- .../config-lgsm/pstbsserver/_default.cfg | 2 +- .../config-lgsm/pvkiiserver/_default.cfg | 2 +- .../config-lgsm/pzserver/_default.cfg | 2 +- .../config-lgsm/q2server/_default.cfg | 2 +- .../config-lgsm/q3server/_default.cfg | 2 +- .../config-lgsm/qlserver/_default.cfg | 2 +- .../config-lgsm/qwserver/_default.cfg | 2 +- .../config-lgsm/ricochetserver/_default.cfg | 2 +- .../config-lgsm/roserver/_default.cfg | 2 +- .../config-lgsm/rtcwserver/_default.cfg | 2 +- .../config-lgsm/rustserver/_default.cfg | 2 +- .../config-lgsm/rwserver/_default.cfg | 2 +- .../config-lgsm/sampserver/_default.cfg | 2 +- .../config-lgsm/sbotsserver/_default.cfg | 2 +- .../config-lgsm/sbserver/_default.cfg | 2 +- .../config-lgsm/sdtdserver/_default.cfg | 2 +- .../config-lgsm/sfcserver/_default.cfg | 2 +- .../config-lgsm/sof2server/_default.cfg | 2 +- .../config-lgsm/solserver/_default.cfg | 2 +- .../config-lgsm/squadserver/_default.cfg | 2 +- .../config-lgsm/ss3server/_default.cfg | 2 +- .../config-lgsm/stserver/_default.cfg | 2 +- .../config-lgsm/svenserver/_default.cfg | 2 +- .../config-lgsm/terrariaserver/_default.cfg | 2 +- .../config-lgsm/tf2server/_default.cfg | 2 +- .../config-lgsm/tfcserver/_default.cfg | 2 +- .../config-lgsm/ts3server/_default.cfg | 2 +- .../config-lgsm/tsserver/_default.cfg | 2 +- .../config-lgsm/tuserver/_default.cfg | 2 +- .../config-lgsm/twserver/_default.cfg | 2 +- .../config-lgsm/untserver/_default.cfg | 2 +- .../config-lgsm/ut2k4server/_default.cfg | 2 +- .../config-lgsm/ut3server/_default.cfg | 2 +- .../config-lgsm/ut99server/_default.cfg | 2 +- .../config-lgsm/utserver/_default.cfg | 2 +- .../config-lgsm/vsserver/_default.cfg | 2 +- .../config-lgsm/wetserver/_default.cfg | 2 +- .../config-lgsm/wfserver/_default.cfg | 2 +- .../config-lgsm/wurmserver/_default.cfg | 2 +- .../config-lgsm/zmrserver/_default.cfg | 2 +- .../config-lgsm/zpsserver/_default.cfg | 2 +- lgsm/data/serverlist.csv | 3 +- lgsm/functions/command_details.sh | 4 +- lgsm/functions/command_dev_query_raw.sh | 1 + lgsm/functions/command_monitor.sh | 14 +- lgsm/functions/command_stop.sh | 32 ++++ lgsm/functions/core_functions.sh | 5 + lgsm/functions/fix.sh | 7 +- lgsm/functions/fix_av.sh | 23 +++ lgsm/functions/info_config.sh | 47 ++++- lgsm/functions/info_messages.sh | 118 ++++++------ tests/tests_defaultcfg/defaultcfg_1.txt | 2 +- 118 files changed, 465 insertions(+), 176 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/avserver/_default.cfg create mode 100644 lgsm/functions/fix_av.sh diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index 43fea751b..b9436fb3f 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -121,7 +121,7 @@ branch="" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index 0701594d7..c41d0c8f9 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -121,7 +121,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 18e60def5..69fc33e0c 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 60061c177..a657d6273 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -126,7 +126,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index 51e06e85d..628634140 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -140,7 +140,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg new file mode 100644 index 000000000..4b53d68d2 --- /dev/null +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -0,0 +1,173 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES 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. + +#### Game Server Settings #### +## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters +port="27000" +# https://steamidfinder.com +adminsteamid="" +avgalaxy="avgalaxy" + +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +if [ ! -z "${adminsteamid}" ]; then + admincmd="--admin ${adminsteamid}" +fi +parms="--galaxy-name ${avgalaxy} --ip ${ip} --datapath ${avdatapath} ${admincmd}" +} + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" +## 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://termbin.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" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# 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" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="565060" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +stopmode="10" + +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="5" +querytype="" + +## Game Server Details +# Do not edit +gamename="Avorion" +engine="avorion" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +avdatapath="${serverfiles}/galaxy" +avgalaxypath="${avdatapath}/${avgalaxy}" +systemdir="${serverfiles}" +executabledir="${systemdir}" +executable="./server.sh" +servercfgdir="${avgalaxypath}" +servercfg="server.ini" +servercfgdefault="server.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/ServerLogs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index 364215629..e361cb9dc 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -130,7 +130,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index 82e59ccfd..3fdb866c3 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index 3770f5b34..ec408753e 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -124,7 +124,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index fca0a01b8..ebb977a92 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -109,7 +109,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index a82bc74e7..61d4c3e4c 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -130,7 +130,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index ec8f8df14..698667c10 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -123,7 +123,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 5d5477d4f..69094f8ef 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -134,7 +134,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg index 7f7026b58..d90b94523 100644 --- a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg @@ -122,7 +122,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index 9e58dddc3..416e77c09 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -117,7 +117,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="7" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 8525f13ed..e9f0a70dd 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index 1ac29768b..a686ea45f 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -112,7 +112,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index 265891d3b..027c52509 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -112,7 +112,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 6892d780e..74e186466 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -112,7 +112,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index a140d50a6..b4e16cfff 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -112,7 +112,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index 358947fbf..aeecf8f7b 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -112,7 +112,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index 4d2777c2d..8065dbba2 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index dbce043fa..963f873c5 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -150,7 +150,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index 1956888cd..584e0ad77 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index 23321a0ef..316eb26f8 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -130,7 +130,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 778514cbe..612ea671f 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index b21595c4e..43fe8e8f1 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index 28f14f2ae..0d1b447c3 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index 0c75e7d21..572046108 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index dcee95d58..d7916e2b5 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -126,7 +126,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index d1997586c..7491e7e55 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -128,7 +128,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index 3790dc837..28cc7fb98 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -130,7 +130,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index e4bc46da3..b4a4b92eb 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -117,7 +117,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 0b9efd818..8ab7aefe1 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -130,7 +130,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index d2b5448e3..add0f74b6 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -106,7 +106,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index beca898b1..fddab05ee 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -117,7 +117,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index ea1a5d9f3..49105660c 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/gesserver/_default.cfg b/lgsm/config-default/config-lgsm/gesserver/_default.cfg index ecdc7d602..a26a5df39 100644 --- a/lgsm/config-default/config-lgsm/gesserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gesserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index b15314016..bd254e8b1 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -141,7 +141,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index 842fd4778..22c3da329 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index f3b8aa074..1a17fdd91 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -124,7 +124,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index 71baee83f..0036ec7e1 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 7c112c636..426d2d250 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -136,7 +136,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index c2279ce42..98817e908 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -131,7 +131,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 0b36880f8..605a95fbb 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -132,7 +132,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index cb3249d6f..acf13f368 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 2b4167172..81cd0ff5b 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -117,7 +117,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index e33061f71..e3793f805 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -117,7 +117,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index c3f6aaf01..7ad9fc930 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -123,7 +123,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index b0de2b29e..f4ef0a7f7 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -129,7 +129,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index bfaaca623..4852b2231 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -124,7 +124,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index 365bf7505..158605d2f 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -124,7 +124,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index 3501928bc..839f5a9af 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -109,7 +109,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="5" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index 664796cbc..a49465f45 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -115,7 +115,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="5" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index d3b98a081..255ecdd04 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index 49eaa189f..1f82fe0c4 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -111,7 +111,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index ac0812cfc..dc6aac282 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -110,7 +110,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="4" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg index 83ecb5eb0..6afe760ae 100644 --- a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg @@ -110,7 +110,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index 46ff6b63b..084bcc20b 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index 3fb1cae94..261d74fed 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -130,7 +130,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index ea1cebd3f..6e857c346 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -132,7 +132,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="6" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 4e05e2cf7..01cb086f9 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -136,7 +136,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="6" ## Query mode diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index 7457a8161..446e8ab8a 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index 389b1411c..7401de91a 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -117,7 +117,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index 60cff0eab..a341627a9 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index 2f73299f5..fc74fbe5e 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -117,7 +117,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index d9ba14c4c..9c60c53bc 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -126,7 +126,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 5971d6bbb..0118ecaa4 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index 8c3d198db..da9ae479d 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -121,7 +121,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index 9dfa92158..832f641c7 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -111,7 +111,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index b4f96b023..6d28f4caf 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -111,7 +111,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index 656287080..3a5471ad6 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -119,7 +119,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index 4f35f05be..59cdcc0f1 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -110,7 +110,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index 10bec3c12..b825fb75b 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 18b352c9c..3cbfd5888 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index 996848ee9..93b9ce3fe 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -111,7 +111,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 7fb73f6d4..cf70cdae7 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -149,7 +149,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index ffa882164..95c37ef2d 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -120,7 +120,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index b04e487ad..67331ee39 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -110,7 +110,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 23bcee08b..6145c9905 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index 460407b4e..f9ae836d1 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -123,7 +123,7 @@ steammaster="flase" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 748d57499..6269e6150 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -120,7 +120,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="8" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index bc76cf097..2203ba14b 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index 0c3036039..090330f49 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -111,7 +111,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index 47a08ddf0..d1f853dca 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -116,7 +116,7 @@ branch="" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 9fbef2101..81eb50c01 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -122,7 +122,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ss3server/_default.cfg b/lgsm/config-default/config-lgsm/ss3server/_default.cfg index 159a054db..9032678a4 100644 --- a/lgsm/config-default/config-lgsm/ss3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ss3server/_default.cfg @@ -121,7 +121,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index 9c8587035..581c1481a 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -127,7 +127,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index 2e3f5cd7f..72b3acadd 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -124,7 +124,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index b6cd00d28..3f941122f 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -124,7 +124,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="7" ## Query mode diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index f5a8579b3..31eefeb12 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -130,7 +130,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index 4111b82be..ccd4988e0 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index fe42acd96..3a511b394 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -112,7 +112,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index cd2cb7cdd..f73622b42 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index cb8f38541..ff4165e45 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -127,7 +127,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index fd6424783..461c97059 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -124,7 +124,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index cee9b4867..ef0fe4c24 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -127,7 +127,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index f317b6126..9c4164c72 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -110,7 +110,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index d785d753c..2a2c8a518 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -121,7 +121,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index b099f3088..caab7ffea 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -110,7 +110,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index 4612d9dc1..40d6cc526 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -114,7 +114,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index 9e4467ae8..1eaa9ff86 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index 3074dec92..54ee3d25b 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -106,7 +106,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index a4860de5d..1ddbd7746 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -111,7 +111,7 @@ sleeptime="0.5" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index cb22a8494..e131fc28b 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -116,7 +116,7 @@ steammaster="false" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index 4a99b33e4..b22f79fc2 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -125,7 +125,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index 6662da3c7..279f7258a 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -130,7 +130,7 @@ steammaster="true" # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion stopmode="3" ## Query mode diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 1fd2562d8..f3b13a7fc 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -3,6 +3,7 @@ ahl,ahlserver,Action half-life ahl2,ahl2server,Action: Source ark,arkserver,ARK: Survival Evolved arma3,arma3server,ARMA 3 +av,avserver,Avorion bb,bbserver,BrainBread bb2,bb2server,BrainBread 2 bd,bdserver,Base Defense @@ -103,4 +104,4 @@ wet,wetserver,Wolfenstein: Enemy Territory wf,wfserver,Warfork wurm,wurmserver,Wurm Unlimited zmr,zmrserver,Zombie Master: Reborn -zps,zpsserver,Zombie Panic! Source +zps,zpsserver,Zombie Panic! Source \ No newline at end of file diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 0551e2442..d2673e27c 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -15,7 +15,9 @@ info_config.sh info_parms.sh info_distro.sh info_messages.sh -query_gamedig.sh +if [ "${querymode}" == "2" ]|| [ "${querymode}" == "3" ]; then + query_gamedig.sh +fi fn_info_message_distro fn_info_message_server_resource fn_info_message_gameserver_resource diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index 4375b731e..0f5e5c8e2 100644 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -81,4 +81,5 @@ else echo -e "TCP query FAIL" fi +exitcode=0 core_exit.sh diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 893ba992f..98f018cf4 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -75,11 +75,17 @@ fn_monitor_check_queryport(){ if [ -z "${queryport}" ]||[ "${queryport}" == "0" ]; then fn_print_dots "Checking port: " fn_print_checking_eol - fn_script_log_info "Checking session: CHECKING" + fn_script_log_info "Checking port: CHECKING" fn_sleep_time - fn_print_error "Checking port: Unable to query as queryport is not set: " - fn_print_error_eol_nl - fn_script_log_error "Checking port: Unable to query as queryport is not set: ERROR" + if [ -n "${rconenabled}" ]&&[ "${rconenabled}" != "true" ]&&[ ${shortname} == "av" ]; then + fn_print_warn "Checking port: Unable to query as rconport, rcon not enabled: " + fn_print_warn_eol_nl + fn_script_log_warn "Checking port: Unable to query rconport, rcon not enabled: WARN" + else + fn_print_error "Checking port: Unable to query queryport is not set: " + fn_print_error_eol_nl + fn_script_log_error "Checking port: Unable to query as queryport is not set: ERROR" + fi fn_sleep_time core_exit.sh fi diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 956f41537..c25714de2 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -181,6 +181,36 @@ fn_stop_graceful_sdtd(){ fn_sleep_time } +# Attempts graceful shutdown by sending /save /stop. +fn_stop_graceful_avorion(){ + fn_print_dots "Graceful: /save /stop" + fn_script_log_info "Graceful: /save /stop" + # Sends /save. + tmux send-keys -t "${selfname}" /save ENTER > /dev/null 2>&1 + sleep 5 + # Sends /quit. + tmux send-keys -t "${selfname}" /stop ENTER > /dev/null 2>&1 + # Waits up to 30 seconds giving the server time to shutdown gracefuly. + for seconds in {1..30}; do + check_status.sh + if [ "${status}" == "0" ]; then + fn_print_ok "Graceful: /save /stop: ${seconds}: " + fn_print_ok_eol_nl + fn_script_log_pass "Graceful: /save /stop: OK: ${seconds} seconds" + break + fi + sleep 1 + fn_print_dots "Graceful: /save /stop: ${seconds}" + done + check_status.sh + if [ "${status}" != "0" ]; then + fn_print_error "Graceful: /save /stop: " + fn_print_fail_eol_nl + fn_script_log_error "Graceful: /save /stop: FAIL" + fi + fn_sleep_time +} + fn_stop_graceful_select(){ if [ "${stopmode}" == "1" ]; then fn_stop_tmux @@ -200,6 +230,8 @@ fn_stop_graceful_select(){ fn_stop_graceful_sdtd elif [ "${stopmode}" == "9" ]; then fn_stop_graceful_goldsrc + elif [ "${stopmode}" == "10" ]; then + fn_stop_graceful_avorion fi } diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index e8cb4be06..29bc46f56 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -301,6 +301,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +fix_av.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fix_arma3.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 7d03bca99..b5c278847 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -90,12 +90,15 @@ fi # Fixes that are run on install only. if [ "${function_selfname}" == "command_install.sh" ]; then - if [ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then + if [ "${shortname}" == "av" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then echo -e "" echo -e "Applying Post-Install Fixes" echo -e "=================================" fn_sleep_time - if [ "${shortname}" == "kf" ]; then + postinstall=1 + if [ "${shortname}" == "av" ]; then + fix_av.sh + elif [ "${shortname}" == "kf" ]; then fix_kf.sh elif [ "${shortname}" == "kf2" ]; then fix_kf2.sh diff --git a/lgsm/functions/fix_av.sh b/lgsm/functions/fix_av.sh new file mode 100644 index 000000000..fcbab6b13 --- /dev/null +++ b/lgsm/functions/fix_av.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# LinuxGSM fix_av.sh function +# Author: Christian Birk +# Website: https://linuxgsm.com +# Description: Resolves startup issue with Avorion + +local commandname="FIX" +local commandaction="Fix" + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" + +if [ "${postinstall}" == "1" ]; then + fn_parms(){ + parms="--datapath ${avdatapath} --galaxy-name ${avgalaxy} --init-folders-only" + } + + fn_print_information "starting ${gamename} server to generate configs." + fn_sleep_time + # go to the executeable dir and start the init of the server + cd "${systemdir}" || return 2 + fn_parms + "${executabledir}/${executable}" ${parms} +fi diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index c37582b59..2a7391739 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -417,7 +417,7 @@ fn_info_config_minecraft_bedrock(){ maxplayers="${zero}" port="${zero}" port6="${zero}" - queryport="${zero}" + queryport="${zero}" gamemode="${unavailable}" gameworld="${unavailable}" else @@ -425,7 +425,7 @@ fn_info_config_minecraft_bedrock(){ maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "server-port\b" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port6=$(grep "server-portv6\b" "${servercfgfullpath}" | sed 's/v6//g' | grep -v "#" | tr -cd '[:digit:]') - queryport=${port} + queryport=${port} gamemode=$(grep "gamemode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/gamemode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -434,7 +434,7 @@ fn_info_config_minecraft_bedrock(){ maxplayers=${maxplayers:-"NOT SET"} port=${port:-"NOT SET"} port6=${port6:-"NOT SET"} - queryport=${queryport:-"NOT SET"} + queryport=${queryport:-"NOT SET"} gamemode=${gamemode:-"NOT SET"} gameworld=${gameworld:-"NOT SET"} fi @@ -459,7 +459,7 @@ fn_info_config_onset(){ maxplayers=${maxplayers:-"NOT SET"} port=${port:-"NOT SET"} httpport=${httpport:-"NOT SET"} - queryport=${queryport:-"NOT SET"} + queryport=${queryport:-"NOT SET"} fi } @@ -1078,7 +1078,7 @@ fn_info_config_ut(){ # Not set servername=${servername:-"NOT SET"} - fi + fi } fn_info_config_warfork(){ @@ -1373,6 +1373,38 @@ fn_info_config_mordhau(){ fi } + +fn_info_config_avorion() { + if [ ! -f "${servercfgfullpath}" ]; then + maxplayers="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + rconpassword="${unavailable}" + rconport="${unavailable}" + rconenabled="${unavailable}" + queryport="${unavailable}" + else + maxplayers=$(grep "maxPlayers=" "${servercfgfullpath}" | sed 's/maxPlayers=//') + servername=$(grep "name=" "${servercfgfullpath}" | sed 's/name=//') + serverpassword=$(grep "password=" "${servercfgfullpath}" | sed 's/password=//') + rconpassword=$(grep "rconPassword=" "${servercfgfullpath}" | sed 's/rconPassword=//') + rconport=$(grep "rconPort=" "${servercfgfullpath}" | sed 's/rconPort=//') + if [ -n "${rconpassword}" ]; then + rconenabled="true" + queryport="${rconport}" + fi + + # Not set + maxplayers=${maxplayers:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + rconpassword=${rconpassword:-"NOT SET"} + rconport=${rconport:-"0"} + rconenabled=${rconenabled:-"false"} + queryport=${queryport:-"0"} + fi +} + fn_info_config_soldat(){ if [ ! -f "${servercfgfullpath}" ]; then adminpassword="${unavailable}" @@ -1405,6 +1437,9 @@ if [ "${shortname}" == "ac" ]; then # ARK: Survival Evolved elif [ "${shortname}" == "ark" ]; then fn_info_config_ark +# Avorion +elif [ "${shortname}" == "av" ]; then + fn_info_config_avorion # Ballistic Overkill elif [ "${shortname}" == "bo" ]; then fn_info_config_ballistic_overkill @@ -1533,7 +1568,7 @@ elif [ "${engine}" == "unreal" ]; then fn_info_config_unreal # Unreal 2 engine elif [ "${engine}" == "unreal2" ]; then - fn_info_config_unreal2 + fn_info_config_unreal2 # Unreal 3 engine elif [ "${engine}" == "unreal3" ]; then fn_info_config_unreal3 diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 00a6dd1d9..07bbaa7f7 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -105,10 +105,10 @@ fn_info_message_server_resource(){ echo -e "" { echo -e "${lightyellow}Network${default}" - if [ "${netint}" ]; then + if [ -n "${netint}" ]; then echo -e "${lightblue}Interface:\t${default}${netint}" fi - if [ "${netlink}" ]; then + if [ -n "${netlink}" ]; then echo -e "${lightblue}Link Speed:\t${default}${netlink}" fi echo -e "${lightblue}IP:\t${default}${ip}" @@ -174,14 +174,14 @@ fn_info_message_gameserver(){ fn_messages_separator { # Server name - if [ "${gdname}" ]; then + if [ -n "${gdname}" ]; then echo -e "${lightblue}Server name:\t${default}${gdname}" - elif [ "${servername}" ]; then + elif [ -n "${servername}" ]; then echo -e "${lightblue}Server name:\t${default}${servername}" fi # Server description - if [ "${serverdescription}" ]; then + if [ -n "${serverdescription}" ]; then echo -e "${lightblue}Server Description:\t${default}${serverdescription}" fi @@ -198,179 +198,175 @@ fn_info_message_gameserver(){ fi # Internet ip - if [ "${extip}" ]; then + if [ -n "${extip}" ]; then if [ "${ip}" != "${extip}" ]; then echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}" fi fi # Display ip - if [ "${displayip}" ]; then + if [ -n "${displayip}" ]; then echo -e "${lightblue}Display IP:\t${default}${displayip}:${port}" fi # Server password - if [ "${serverpassword}" ]; then + if [ -n "${serverpassword}" ]; then echo -e "${lightblue}Server password:\t${default}${serverpassword}" fi # Query enabled (Starbound) - if [ "${queryenabled}" ]; then + if [ -n "${queryenabled}" ]; then echo -e "${lightblue}Query enabled:\t${default}${queryenabled}" fi # RCON enabled (Starbound) - if [ "${rconenabled}" ]; then - echo -e "${lightblue}RCON enabled:\t${default}${rconpassword}" + if [ -n "${rconenabled}" ]; then + echo -e "${lightblue}RCON enabled:\t${default}${rconenabled}" fi # RCON password - if [ "${rconpassword}" ]; then + if [ -n "${rconpassword}" ]; then echo -e "${lightblue}RCON password:\t${default}${rconpassword}" fi # RCON web (Rust) - if [ "${rconweb}" ]; then + if [ -n "${rconweb}" ]; then echo -e "${lightblue}RCON web:\t${default}${rconweb}" fi # Admin password - if [ "${adminpassword}" ]; then + if [ -n "${adminpassword}" ]; then echo -e "${lightblue}Admin password:\t${default}${adminpassword}" fi # Stats password (Quake Live) - if [ "${statspassword}" ]; then + if [ -n "${statspassword}" ]; then echo -e "${lightblue}Stats password:\t${default}${statspassword}" fi # Players if [ "${querystatus}" != "0" ]; then - if [ "${maxplayers}" ]; then + if [ -n "${maxplayers}" ]; then echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}" fi else - if [ "${gdplayers}" ]&&[ -n "${gdmaxplayers}" ]; then + if [ -n "${gdplayers}" ]&&[ -n "${gdmaxplayers}" ]; then echo -e "${lightblue}Players:\t${default}${gdplayers}/${gdmaxplayers}" - - elif [ "${gdplayers}" ]&&[ -n "${maxplayers}" ]; then + elif [ -n "${gdplayers}" ]&&[ -n "${maxplayers}" ]; then echo -e "${lightblue}Players:\t${default}${gdplayers}/${maxplayers}" - elif [ -z "${gdplayers}" ]&&[ -n "${gdmaxplayers}" ]; then echo -e "${lightblue}Players:\t${default}0/${gdmaxplayers}" - - elif [ "${gdplayers}" ]&&[ -z "${gdmaxplayers}" ]; then - echo -e "${lightblue}Players:\t${default}${gdplayers}|∞" - + elif [ -n "${gdplayers}" ]&&[ -z "${gdmaxplayers}" ]; then + echo -e "${lightblue}Players:\t${default}${gdplayers}/∞" elif [ -z "${gdplayers}" ]&&[ -z "${gdmaxplayers}" ]&&[ -n "${maxplayers}" ]; then echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}" fi fi # Bots - if [ "${gdbots}" ]; then + if [ -n "${gdbots}" ]; then echo -e "${lightblue}Bots:\t${default}${gdbots}" fi # Current map - if [ "${gdmap}" ]; then + if [ -n "${gdmap}" ]; then echo -e "${lightblue}Current map:\t${default}${gdmap}" fi # Default map - if [ "${defaultmap}" ]; then + if [ -n "${defaultmap}" ]; then echo -e "${lightblue}Default map:\t${default}${defaultmap}" fi - if [ "${defaultscenario}" ]; then + if [ -n "${defaultscenario}" ]; then # Current scenario - if [ "${gdgamemode}" ]; then + if [ -n "${gdgamemode}" ]; then echo -e "${lightblue}Current scenario:\t${default}${gdgamemode}" fi else # Current game mode - if [ "${gdgamemode}" ]; then + if [ -n "${gdgamemode}" ]; then echo -e "${lightblue}Current game mode:\t${default}${gdgamemode}" fi fi # Default scenario - if [ "${defaultscenario}" ]; then + if [ -n "${defaultscenario}" ]; then echo -e "${lightblue}Default scenario:\t${default}${defaultscenario}" fi # Game type - if [ "${gametype}" ]; then + if [ -n "${gametype}" ]; then echo -e "${lightblue}Game type:\t${default}${gametype}" fi # Game mode - if [ "${gamemode}" ]; then + if [ -n "${gamemode}" ]; then echo -e "${lightblue}Game mode:\t${default}${gamemode}" fi # Game world - if [ "${gameworld}" ]; then + if [ -n "${gameworld}" ]; then echo -e "${lightblue}Game world:\t${default}${gameworld}" fi # Tick rate - if [ "${tickrate}" ]; then + if [ -n "${tickrate}" ]; then echo -e "${lightblue}Tick rate:\t${default}${tickrate}" fi # Sharding (Don't Starve Together) - if [ "${sharding}" ]; then + if [ -n "${sharding}" ]; then echo -e "${lightblue}Sharding:\t${default}${sharding}" fi # Master (Don't Starve Together) - if [ "${master}" ]; then + if [ -n "${master}" ]; then echo -e "${lightblue}Master:\t${default}${master}" fi # Shard (Don't Starve Together) - if [ "${shard}" ]; then + if [ -n "${shard}" ]; then echo -e "${lightblue}Shard:\t${default}${shard}" fi # Cluster (Don't Starve Together) - if [ "${cluster}" ]; then + if [ -n "${cluster}" ]; then echo -e "${lightblue}Cluster:\t${default}${cluster}" fi # Cave (Don't Starve Together) - if [ "${cave}" ]; then + if [ -n "${cave}" ]; then echo -e "${lightblue}Cave:\t${default}${cave}" fi # Creativemode (Hurtworld) - if [ "${creativemode}" ]; then + if [ -n "${creativemode}" ]; then echo -e "${lightblue}Creativemode:\t${default}${creativemode}" fi # TeamSpeak dbplugin - if [ "${dbplugin}" ]; then + if [ -n "${dbplugin}" ]; then echo -e "${lightblue}dbplugin:\t${default}${dbplugin}" fi # ASE (Multi Theft Auto) - if [ "${ase}" ]; then + if [ -n "${ase}" ]; then echo -e "${lightblue}ASE:\t${default}${ase}" fi # Save interval (Rust) - if [ "${saveinterval}" ]; then + if [ -n "${saveinterval}" ]; then echo -e "${lightblue}ASE:\t${default}${saveinterval} s" fi # Random map rotation mode (Squad and Post Scriptum) - if [ "${randommap}" ]; then + if [ -n "${randommap}" ]; then echo -e "${lightblue}Map rotation:\t${default}${randommap}" fi # Listed on Master server - if [ "${displaymasterserver}" ]; then + if [ -n "${displaymasterserver}" ]; then if [ "${displaymasterserver}" == "true" ]; then echo -e "${lightblue}Master server:\t${green}${displaymasterserver}${default}" else @@ -416,12 +412,12 @@ fn_info_message_script(){ echo -e "${lightblue}Script name:\t${default}${selfname}" # LinuxGSM version - if [ "${version}" ]; then + if [ -n "${version}" ]; then echo -e "${lightblue}LinuxGSM version:\t${default}${version}" fi # glibc required - if [ "${glibc}" ]; then + if [ -n "${glibc}" ]; then if [ "${glibc}" == "null" ]; then # Glibc is not required. : @@ -451,7 +447,7 @@ fn_info_message_script(){ # Telegram alert echo -e "${lightblue}Telegram alert:\t${default}${telegramalert}" # Update on start - if [ "${updateonstart}" ]; then + if [ -n "${updateonstart}" ]; then echo -e "${lightblue}Update on start:\t${default}${updateonstart}" fi @@ -462,7 +458,7 @@ fn_info_message_script(){ echo -e "${lightblue}Location:\t${default}${rootdir}" # Config file location - if [ "${servercfgfullpath}" ]; then + if [ -n "${servercfgfullpath}" ]; then if [ -f "${servercfgfullpath}" ]; then echo -e "${lightblue}Config file:\t${default}${servercfgfullpath}" elif [ -d "${servercfgfullpath}" ]; then @@ -473,7 +469,7 @@ fn_info_message_script(){ fi # Network config file location (ARMA 3) - if [ "${networkcfgfullpath}" ]; then + if [ -n "${networkcfgfullpath}" ]; then echo -e "${lightblue}Network config file:\t${default}${networkcfgfullpath}" fi } | column -s $'\t' -t @@ -553,7 +549,7 @@ fn_info_message_ports(){ fi done # engines/games that require editing the parms. - local ports_edit_array=( "goldsrc" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "qfusion" "Rust" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" ) + local ports_edit_array=( "Avorion" "goldsrc" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "qfusion" "Rust" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then @@ -580,7 +576,7 @@ fn_info_logs(){ echo -e "${selfname} Logs" echo -e "=================================" - if [ "${lgsmlog}" ]; then + if [ -n "${lgsmlog}" ]; then echo -e "\nScript log\n===================" if [ ! "$(ls -A "${lgsmlogdir}")" ]; then echo -e "${lgsmlogdir} (NO LOG FILES)" @@ -593,7 +589,7 @@ fn_info_logs(){ echo -e "" fi - if [ "${consolelog}" ]; then + if [ -n "${consolelog}" ]; then echo -e "\nConsole log\n====================" if [ ! "$(ls -A "${consolelogdir}")" ]; then echo -e "${consolelogdir} (NO LOG FILES)" @@ -606,7 +602,7 @@ fn_info_logs(){ echo -e "" fi - if [ "${gamelogdir}" ]; then + if [ -n "${gamelogdir}" ]; then echo -e "\nServer log\n===================" if [ ! "$(ls -A "${gamelogdir}")" ]; then echo -e "${gamelogdir} (NO LOG FILES)" @@ -646,6 +642,16 @@ fn_info_message_ark(){ } | column -s $'\t' -t } +fn_info_message_avorion() { + echo "netstat -atunp | grep Avorion" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + } | column -s $'\t' -t +} + fn_info_message_ballisticoverkill(){ echo -e "netstat -atunp | grep BODS.x86" echo -e "" @@ -1372,6 +1378,8 @@ fn_info_message_select_engine(){ fn_info_message_assettocorsa elif [ "${shortname}" == "ark" ]; then fn_info_message_ark + elif [ "${shortname}" == "av" ]; then + fn_info_message_avorion elif [ "${shortname}" == "arma3" ]; then fn_info_message_arma3 elif [ "${shortname}" == "bo" ]; then diff --git a/tests/tests_defaultcfg/defaultcfg_1.txt b/tests/tests_defaultcfg/defaultcfg_1.txt index 7bd9963c6..505b6b1f0 100644 --- a/tests/tests_defaultcfg/defaultcfg_1.txt +++ b/tests/tests_defaultcfg/defaultcfg_1.txt @@ -40,7 +40,7 @@ # 7: exit # 8: 7 Days to Die # 9: GoldSrc -# 10: Teamspeak 3 +# 10: Avorion ## Game Server Details # Do not edit #### Directories #### From d706ec3b3a519e963c270cf12bdd74badbcbcc7d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 22 Apr 2020 22:13:49 +0100 Subject: [PATCH 04/96] remove space --- lgsm/functions/command_details.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index d2673e27c..02726f197 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -15,7 +15,7 @@ info_config.sh info_parms.sh info_distro.sh info_messages.sh -if [ "${querymode}" == "2" ]|| [ "${querymode}" == "3" ]; then +if [ "${querymode}" == "2" ]||[ "${querymode}" == "3" ]; then query_gamedig.sh fi fn_info_message_distro From 0ff1e428be9e15cbdadeecba1375c467c21f0853 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 23 Apr 2020 07:49:45 +0100 Subject: [PATCH 05/96] release v20.2.0 --- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index d11617fc3..19ebb01af 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.1.5" +version="v20.2.0" shortname="core" gameservername="core" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index c7bf9192a..235d1bd93 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.1.5" +version="v20.2.0" shortname="fctr" gameservername="fctrserver" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 3f9b49e4a..65e8acaef 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.1.5" +version="v20.2.0" shortname="jc2" gameservername="jc2server" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 605613c46..1a3f86802 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.1.5" +version="v20.2.0" shortname="mc" gameservername="mcserver" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index a4049a138..01c195ce3 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.1.5" +version="v20.2.0" shortname="ts3" gameservername="ts3server" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") From b69d8a89173271dd5750b71531e21d6821e6c44f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 24 Apr 2020 09:07:23 +0100 Subject: [PATCH 06/96] added missing glibc requirment to Assetto Corsa --- lgsm/config-default/config-lgsm/acserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index b9436fb3f..7bc9de9d1 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -137,7 +137,7 @@ querytype="" # Do not edit gamename="Assetto Corsa" engine="unity3d" -glibc="" +glibc="2.15" #### Directories #### # Edit with care From 57243aae9a9ebf47c82979919646ea2da11ea9b2 Mon Sep 17 00:00:00 2001 From: PwnK <22644348+PwnK@users.noreply.github.com> Date: Sat, 25 Apr 2020 23:01:13 +0300 Subject: [PATCH 07/96] remove appinfo.vdf correctly (#2841) --- lgsm/config-default/config-lgsm/acserver/_default.cfg | 2 +- lgsm/functions/update_steamcmd.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index b9436fb3f..7bc9de9d1 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -137,7 +137,7 @@ querytype="" # Do not edit gamename="Assetto Corsa" engine="unity3d" -glibc="" +glibc="2.15" #### Directories #### # Edit with care diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 6ac489042..ed809451a 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -48,8 +48,8 @@ fn_update_steamcmd_localbuild(){ localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. - if [ -f "${HOME}/Steam/appcache/appinfo.vdf" ]; then - rm -f "${HOME}/Steam/appcache/appinfo.vdf" + if [ -f "${HOME}/.steam/appcache/appinfo.vdf" ]; then + rm -f "${HOME}/.steam/appcache/appinfo.vdf" fi # Set branch for updateinfo. From 560c4d2dba63f4a8d9ab4eda72f3fcd81468f5cb Mon Sep 17 00:00:00 2001 From: nero82 Date: Mon, 27 Apr 2020 12:36:44 +0200 Subject: [PATCH 08/96] fix(ts3server): improve ts3 ip parsing (#2843) --- lgsm/functions/info_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 2a7391739..452a0620a 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -851,7 +851,7 @@ fn_info_config_teamspeak3(){ queryport=$(grep "query_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') fileport=$(grep "filetransfer_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - ip=$(grep "voice_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/voice_ip//g' | sed 's/,.*//' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ip=$(grep "voice_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/voice_ip//g' | sed 's/,.*//' | tr -d '=\";,' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') ipsetinconfig=1 ipinconfigvar="voice_ip" From bd408a1250487f0a40aa660df5c3ea6c3cb3b14e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 28 Apr 2020 21:46:19 +0100 Subject: [PATCH 09/96] fix(debug): correct command not exiting correctly fix(debug): correct command not exiting correctly --- lgsm/functions/command_debug.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 5a681c4a2..9da7ae95c 100644 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -14,8 +14,11 @@ fn_lockfile_trap(){ rm -f "${lockdir:?}/${selfname}.lock" # resets terminal. Servers can sometimes mess up the terminal on exit. reset - fn_print_ok_nl "Closing debug" - fn_script_log_pass "Debug closed" + fn_print_dots "Stopping debug" + fn_print_ok_nl "Stopping debug" + fn_script_log_pass "Stopping debug" + # remove trap. + trap - INT core_exit.sh } @@ -85,6 +88,7 @@ fn_print_info_nl "Stopping any running servers" fn_script_log_info "Stopping any running servers" exitbypass=1 command_stop.sh +unset exitbypass fn_print_dots "Starting debug" fn_script_log_info "Starting debug" fn_print_ok_nl "Starting debug" @@ -93,27 +97,26 @@ fn_print_ok_nl "Starting debug" date '+%s' > "${lockdir}/${selfname}.lock" fn_script_log_info "Lockfile generated" fn_script_log_info "${lockdir}/${selfname}.lock" -# trap to remove lockfile on quit. -trap fn_lockfile_trap INT cd "${executabledir}" || exit # Note: do not add double quotes to ${executable} ${parms}. if [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then ${executable} ${parms} -debug -elif [ "${engine}" == "realvirtuality" ]; then +elif [ "${shortname}" == "arma3" ]; then # Arma3 requires semicolons in the module list, which need to # be escaped for regular (tmux) loading, but need to be # stripped when loading straight from the console. ${executable} ${parms//\\;/;} elif [ "${engine}" == "quake" ]; then - ${executable} ${parms} -condebug + ${executable} ${parms} -condebug else ${executable} ${parms} fi +fn_lockfile_trap + fn_print_dots "Stopping debug" fn_print_ok_nl "Stopping debug" -# remove trap. -trap - INT +fn_script_log_info "Stopping debug" core_exit.sh From c8848891befbe0f75eabbc21ca47d850aa520655 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 29 Apr 2020 20:14:37 +0100 Subject: [PATCH 10/96] feat(install): convert non-steamcmd game srvers to use tar.xz (#2851) * converted to xz * added source forts dependencies and merged bf1942 * update zmr dependencies --- lgsm/functions/check_deps.sh | 40 +++++++++----------- lgsm/functions/command_backup.sh | 2 +- lgsm/functions/core_dl.sh | 4 +- lgsm/functions/install_server_files.sh | 52 +++++++++++++------------- 4 files changed, 46 insertions(+), 52 deletions(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 5c830b048..9c92ffbef 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -220,10 +220,10 @@ fn_deps_email(){ } fn_found_missing_deps(){ - if [ "${#array_deps_missing[@]}" != "0" ]; then + if [ "${#array_deps_missing[*]}" != "0" ]; then - fn_print_warning_nl "Missing dependencies: ${red}${array_deps_missing[@]}${default}" - fn_script_log_warn "Missing dependencies: ${array_deps_missing[@]}" + fn_print_warning_nl "Missing dependencies: ${red}${array_deps_missing[*]}${default}" + fn_script_log_warn "Missing dependencies: ${array_deps_missing[*]}" fn_sleep_time if [ "${monostatus}" ]; then fn_install_mono_repo @@ -248,13 +248,13 @@ fn_found_missing_deps(){ sleep 1 echo -en " \r" if [ "$(command -v dpkg-query 2>/dev/null)" ]; then - cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; sudo dpkg --add-architecture i386; sudo apt update; sudo apt -y install ${array_deps_missing[@]}" + cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; sudo dpkg --add-architecture i386; sudo apt update; sudo apt -y install ${array_deps_missing[*]}" eval "${cmd}" elif [ "$(command -v dnf 2>/dev/null)" ]; then - cmd="sudo dnf -y install ${array_deps_missing[@]}" + cmd="sudo dnf -y install ${array_deps_missing[*]}" eval "${cmd}" elif [ "$(command -v yum 2>/dev/null)" ]; then - cmd="sudo yum -y install ${array_deps_missing[@]}" + cmd="sudo yum -y install ${array_deps_missing[*]}" eval "${cmd}" fi if [ $? != 0 ]; then @@ -264,11 +264,11 @@ fn_found_missing_deps(){ fn_print_warning_nl "Manually install dependencies." fn_script_log_warn "Manually install dependencies." if [ "$(command -v dpkg-query 2>/dev/null)" ]; then - echo -e " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}" + echo -e " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[*]}" elif [ "$(command -v dnf 2>/dev/null)" ]; then - echo -e " sudo dnf install ${array_deps_missing[@]}" + echo -e " sudo dnf install ${array_deps_missing[*]}" elif [ "$(command -v yum 2>/dev/null)" ]; then - echo -e " sudo yum install ${array_deps_missing[@]}" + echo -e " sudo yum install ${array_deps_missing[*]}" fi if [ "${steamcmdfail}" ]; then echo -e "" @@ -290,11 +290,11 @@ fn_found_missing_deps(){ fn_script_log_warn "$(whoami) does not have sudo access. Manually install dependencies." echo -e "" if [ "$(command -v dpkg-query 2>/dev/null)" ]; then - echo -e "sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}" + echo -e "sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[*]}" elif [ "$(command -v dnf 2>/dev/null)" ]; then - echo -e "sudo dnf install ${array_deps_missing[@]}" + echo -e "sudo dnf install ${array_deps_missing[*]}" elif [ "$(command -v yum 2>/dev/null)" ]; then - echo -e "sudo yum install ${array_deps_missing[@]}" + echo -e "sudo yum install ${array_deps_missing[*]}" fi if [ "${steamcmdfail}" ]; then echo -e "" @@ -322,7 +322,7 @@ fn_found_missing_deps(){ fn_check_loop(){ # Loop though required depenencies. - for deptocheck in "${array_deps_required[@]}" + for deptocheck in ${array_deps_required[*]} do fn_deps_detector done @@ -368,8 +368,8 @@ fn_deps_build_debian(){ # 7 Days to Die elif [ "${shortname}" == "sdtd" ]; then array_deps_required+=( telnet expect ) - # No More Room in Hell, Counter-Strike: Source, Garry's Mod and Zombie Panic: Source - elif [ "${shortname}" == "nmrih" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "zps" ]; then + # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source + elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then if [ "${arch}" == "x86_64" ]; then array_deps_required+=( libtinfo5:i386 ) else @@ -381,9 +381,6 @@ fn_deps_build_debian(){ if [ "${shortname}" == "tf2" ]; then array_deps_required+=( libtcmalloc-minimal4:i386 ) fi - # Battlefield: 1942 - elif [ "${shortname}" == "bf1942" ]; then - array_deps_required+=( libncurses5:i386 ) # Call of Duty & Medal of Honor: Allied Assault elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${shortname}" == "cod2" ]||[ "${shortname}" == "mohaa" ]; then array_deps_required+=( libstdc++5:i386 ) @@ -483,8 +480,8 @@ fn_deps_build_redhat(){ # 7 Days to Die elif [ "${shortname}" == "sdtd" ]; then array_deps_required+=( telnet expect ) - # No More Room in Hell, Counter-Strike: Source, Garry's Mod and Zombie Panic: Source - elif [ "${shortname}" == "nmrih" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "zps" ]; then + # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source + elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then array_deps_required+=( ncurses-libs.i686 ) # Brainbread 2, Don't Starve Together & Team Fortress 2 elif [ "${shortname}" == "bb2" ]||[ "${shortname}" == "dst" ]||[ "${shortname}" == "tf2" ]; then @@ -492,9 +489,6 @@ fn_deps_build_redhat(){ if [ "${shortname}" == "tf2" ]; then array_deps_required+=( gperftools-libs.i686 ) fi - # Battlefield: 1942 - elif [ "${shortname}" == "bf1942" ]; then - array_deps_required+=( ncurses-libs.i686 ) # Call of Duty & Medal of Honor: Allied Assault elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${shortname}" == "cod2" ]||[ "${shortname}" == "mohaa" ]; then array_deps_required+=( compat-libstdc++-33.i686 ) diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 1f9a2cae7..d4befa46c 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -143,7 +143,7 @@ fn_backup_compression(){ if [ ${exitcode} -ne 0 ]; then fn_print_fail_eol fn_script_log_fatal "Backup in progress: FAIL" - echo -e "${tarcmd}" | tee -a "${lgsmlog}" + echo -e "${extractcmd}" | tee -a "${lgsmlog}" fn_print_fail_nl "Starting backup" fn_script_log_fatal "Starting backup" else diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 244ccb9f9..ff428a909 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -77,9 +77,9 @@ fn_dl_extract(){ if [ "${mime}" == "application/gzip" ]||[ "${mime}" == "application/x-gzip" ]; then extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdir}") elif [ "${mime}" == "application/x-bzip2" ]; then - tarcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdir}") + extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdir}") elif [ "${mime}" == "application/x-xz" ]; then - tarcmd=$(tar -xf "${local_filedir}/${local_filename}" -C "${extractdir}") + extractcmd=$(tar -xf "${local_filedir}/${local_filename}" -C "${extractdir}") elif [ "${mime}" == "application/zip" ]; then extractcmd=$(unzip -qo -d "${extractdir}" "${local_filedir}/${local_filename}") fi diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 75aefccc5..8cb203bac 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -10,59 +10,59 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_server_files(){ if [ "${shortname}" == "ahl" ]; then - remote_fileurl="http://linuxgsm.download/ActionHalfLife/action_halflife-1.0.tar.bz2"; local_filedir="${tmpdir}"; local_filename="action_halflife-1.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="31430e670692b2eeaa0d1217db4dcb73" + remote_fileurl="http://linuxgsm.download/ActionHalfLife/action_halflife-1.0.tar.xz"; local_filedir="${tmpdir}"; local_filename="action_halflife-1.0.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="61d7b79fd714888b6d65944fdaafa94a" elif [ "${shortname}" == "bf1942" ]; then - remote_fileurl="http://linuxgsm.download/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" + remote_fileurl="http://linuxgsm.download/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz"; local_filedir="${tmpdir}"; local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="4223bf4ed85f5162c24b2cba51249b9e" elif [ "${shortname}" == "bb" ]; then - remote_fileurl="http://linuxgsm.download/BrainBread/brainbread-v1.2-linuxserver.tar.bz2"; local_filedir="${tmpdir}"; local_filename="brainbread-v1.2-linuxserver.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="5c729a7e9eecfa81b71a6a1f7267f0fd" + remote_fileurl="http://linuxgsm.download/BrainBread/brainbread-v1.2-linuxserver.tar.xz"; local_filedir="${tmpdir}"; local_filename="brainbread-v1.2-linuxserver.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="55f227183b736397806d5b6db6143f15" elif [ "${shortname}" == "cod" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDuty/cod-lnxded-1.5b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod-lnxded-1.5-large.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="19629895a4cf6fd8f6d1ee198b5304cd" + remote_fileurl="http://linuxgsm.download/CallOfDuty/cod-lnxded-1.5b-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="cod-lnxded-1.5-large.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="ee0ad1ccbfa1fd27fde01a4a431a5c2f" elif [ "${shortname}" == "coduo" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="coduo-lnxded-1.51b-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f1804ef13036e2b4ab535db000b19e97" + remote_fileurl="http://linuxgsm.download/CallOfDutyUnitedOffensive/coduo-lnxded-1.51b-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="coduo-lnxded-1.51b-full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="35cabccd67adcda44aaebc59405915b9" elif [ "${shortname}" == "cod2" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDuty2/cod2-lnxded-1.3-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod2-lnxded-1.3-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="078128f83d06dc3d7699428dc2870214" + remote_fileurl="http://linuxgsm.download/CallOfDuty2/cod2-lnxded-1.3-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="cod2-lnxded-1.3-full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="b8c4c611f01627dd43348e78478a3d41" elif [ "${shortname}" == "cod4" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDuty4/cod4x18_1772_dedrun.tar.bz2"; local_filedir="${tmpdir}"; local_filename="cod4x18_1772_dedrun.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="de29f29d79f9cc24574b838daa501e46" + remote_fileurl="http://linuxgsm.download/CallOfDuty4/cod4x18_1790_lnxded.tar.xz"; local_filedir="${tmpdir}"; local_filename="cod4x18_1790_lnxded.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="30609db2afde09d22498fbab3a427d11" elif [ "${shortname}" == "codwaw" ]; then - remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0489697ff3bf678c109bfb377d1b7895" + remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2c6be1bb66ea631b9b2e7ae6216c6680" elif [ "${shortname}" == "etl" ]; then - remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.75-i386-et-260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="etlegacy-v2.75-i386-et-260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="92d7d4c26e0a295daed78cef623eeabb" + remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.76-i386-et-260b.tar.xz"; local_filedir="${tmpdir}"; local_filename="etlegacy-v2.75-i386-et-260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="178a00233cec1e25b69d130107ce1a79" elif [ "${shortname}" == "ges" ]; then - remote_fileurl="http://linuxgsm.download/GoldenEyeSource/GoldenEye_Source_v5.0.6_full_server.tar.bz2"; local_filedir="${tmpdir}"; local_filename="GoldenEye_Source_v5.0.6_full_server.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="c45c16293096706e8b5e2cd64a6f2931" + remote_fileurl="http://linuxgsm.download/GoldenEyeSource/GoldenEye_Source_v5.0.6_full_server.tar.xz"; local_filedir="${tmpdir}"; local_filename="GoldenEye_Source_v5.0.6_full_server.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="e31481f280eed40c9145816bd4f6dc45" elif [ "${shortname}" == "mohaa" ]; then - remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="moh_revival_v1.12_RC3.5.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="9d5924486a0cf5e46dd063216aad05c1" + remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.xz"; local_filedir="${tmpdir}"; local_filename="moh_revival_v1.12_RC3.5.1.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7c664538999252eeaf2b6d9949416480" elif [ "${shortname}" == "ns" ]; then - remote_fileurl="http://linuxgsm.download/NaturalSelection/ns_dedicated_server_v32.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ns_dedicated_server_v32.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="499cf63324b76925ada6baf5f2eacd67" + remote_fileurl="http://linuxgsm.download/NaturalSelection/ns_dedicated_server_v32.tar.xz"; local_filedir="${tmpdir}"; local_filename="ns_dedicated_server_v32.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="23ec3cadd93d8bb1c475bad5b9cce370" elif [ "${shortname}" == "q2" ]; then - remote_fileurl="http://linuxgsm.download/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f" + remote_fileurl="http://linuxgsm.download/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.xz"; local_filedir="${tmpdir}"; local_filename="quake2-3.20-glibc-i386-full-linux2.0.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2908164a32d4808bb720f2161f6b0c82" elif [ "${shortname}" == "q3" ]; then - remote_fileurl="http://linuxgsm.download/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="quake3-1.32c-x86-full-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306" + remote_fileurl="http://linuxgsm.download/Quake3/quake3-1.32c-x86-full-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="quake3-1.32c-x86-full-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="b0e26d8919fe9313fb9d8ded2360f3db" elif [ "${shortname}" == "qw" ]; then - remote_fileurl="http://linuxgsm.download/QuakeWorld/nquake.server.linux.190506.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.190506.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="74405ec030463c5e1175e776ab572d32" + remote_fileurl="http://linuxgsm.download/QuakeWorld/nquake.server.linux.190506.full.tar.xz"; local_filedir="${tmpdir}"; local_filename="nquake.server.linux.190506.full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="82055b7d973206c13a606db8ba288d03" elif [ "${shortname}" == "rtcw" ]; then - remote_fileurl="http://linuxgsm.download/ReturnToCastleWolfenstein/iortcw-1.51c-x86_64-server-linux-20190507.tar.bz2"; local_filedir="${tmpdir}"; local_filename="iortcw-1.51c-x86_64-server-linux-20190507.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="6a3be9700372b228d1187422464e4212" + remote_fileurl="http://linuxgsm.download/ReturnToCastleWolfenstein/iortcw-1.51c-x86_64-server-linux-20190507.tar.xz"; local_filedir="${tmpdir}"; local_filename="iortcw-1.51c-x86_64-server-linux-20190507.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="df6ff664d37dd0d22787848bdb3cac5f" elif [ "${shortname}" == "sfc" ]; then - remote_fileurl="http://linuxgsm.download/SourceFortsClassic/SFClassic-1.0-RC7-fix.tar.bz2"; local_filedir="${tmpdir}"; local_filename="SFClassic-1.0-RC7-fix.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="e0d4cfd298a8a356053f92b1fa7d1002" + remote_fileurl="http://linuxgsm.download/SourceFortsClassic/SFClassic-1.0-RC7-fix.tar.xz"; local_filedir="${tmpdir}"; local_filename="SFClassic-1.0-RC7-fix.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="70077137185700e28fe6bbb6021d12bc" elif [ "${shortname}" == "sof2" ]; then - remote_fileurl="http://linuxgsm.download/SoldierOfFortune2/sof2gold-1.03.tar.bz2"; local_filedir="${tmpdir}"; local_filename="sof2gold-1.03.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="871b1dc0dafeeace65b198119e8fa200" + remote_fileurl="http://linuxgsm.download/SoldierOfFortune2/sof2gold-1.03.tar.xz"; local_filedir="${tmpdir}"; local_filename="sof2gold-1.03.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="201e23bab04207d00ce813d001c483d9" elif [ "${shortname}" == "ts" ]; then - remote_fileurl="http://linuxgsm.download/TheSpecialists/ts-3-linux-final.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ts-3-linux-final.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="38e8a8325339f85a7745117802f940b7" + remote_fileurl="http://linuxgsm.download/TheSpecialists/ts-3-linux-final.tar.xz"; local_filedir="${tmpdir}"; local_filename="ts-3-linux-final.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="3c66ecff6e3644f7ac88015732a0fb93" elif [ "${shortname}" == "ut2k4" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament2004/ut2004-server-3369-2-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-2-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" + remote_fileurl="http://linuxgsm.download/UnrealTournament2004/ut2004-server-3369-2-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-2-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="8ebcb9b8f703905053d13a35c3af3e79" elif [ "${shortname}" == "ut99" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; local_filedir="${tmpdir}"; local_filename="ut99-server-451-ultimate-linux.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd" + remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-451-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut99-server-451-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="42c6839f8cb95907eeef71a1838aa1f7" elif [ "${shortname}" == "ut" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament/UnrealTournament-Server-XAN-3525360-Linux.zip"; local_filedir="${tmpdir}"; local_filename="UnrealTournament-Server-XAN-3525360-Linux.zip"; chmodx="noexecute" run="norun"; force="noforce"; md5="cad730ad6793ba6261f9a341ad7396eb" + remote_fileurl="http://linuxgsm.download/UnrealTournament/UnrealTournament-Server-XAN-3525360-Linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="UnrealTournament-Server-XAN-3525360-Linux.tar.xz"; chmodx="noexecute" run="norun"; force="noforce"; md5="41dd92015713a78211eaccf503b72393" elif [ "${shortname}" == "ut3" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; local_filedir="${tmpdir}"; local_filename="UT3-linux-server-2.1.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6" + remote_fileurl="http://linuxgsm.download/UnrealTournament3/UT3-linux-server-2.1.tar.xz"; local_filedir="${tmpdir}"; local_filename="UT3-linux-server-2.1.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="6b92b083c7ab416399e2183a22fda1df" elif [ "${shortname}" == "vs" ]; then - remote_fileurl="http://linuxgsm.download/VampireSlayer/vs_l-6.0_full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="vs_l-6.0_full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="38a79e44b98578bbdc5b15818493a066" + remote_fileurl="http://linuxgsm.download/VampireSlayer/vs_l-6.0_full.tar.xz"; local_filedir="${tmpdir}"; local_filename="vs_l-6.0_full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="b322f79e0abd31847493c52acf802667" elif [ "${shortname}" == "wet" ]; then - remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" + remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/enemy-territory.260b.tar.xz"; local_filedir="${tmpdir}"; local_filename="enemy-territory.260b.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="581a333cc7eacda2f56d5a00fe11eafa" elif [ "${shortname}" == "samp" ]; then remote_fileurl="https://files.sa-mp.com/samp037svr_R2-1.tar.gz"; local_filedir="${tmpdir}"; local_filename="samp037svr_R2-1.tar.gz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="93705e165550c97484678236749198a4" elif [ "${shortname}" == "zmr" ]; then - remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b5_2.tar.bz2"; local_filedir="${tmpdir}"; local_filename="zombie_master_reborn_b5_2.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="d52ef2db376f5d21e3a4ceca85ec8761" + remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b5_2.tar.xz"; local_filedir="${tmpdir}"; local_filename="zombie_master_reborn_b5_2.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="4b9b9832e863d03981a40c26065792a6" fi fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" From 216c29d0e5a68b6de87965571ebf645201faa22b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 29 Apr 2020 22:35:11 +0100 Subject: [PATCH 11/96] fix(arkserver): remove all appworkshop_346110.acf if multiple exist (#2852) --- lgsm/functions/command_validate.sh | 2 + lgsm/functions/fix_ark.sh | 78 ++++++++++++++++-------------- 2 files changed, 45 insertions(+), 35 deletions(-) diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 410d1eb4d..09b7f23b7 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -90,3 +90,5 @@ if [ "${status}" != "0" ]; then else fn_validate fi + +core_exit.sh diff --git a/lgsm/functions/fix_ark.sh b/lgsm/functions/fix_ark.sh index b9cc17e9a..67e20d495 100644 --- a/lgsm/functions/fix_ark.sh +++ b/lgsm/functions/fix_ark.sh @@ -4,44 +4,52 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with ARK: Survival Evolved. -# Steam mods directory selecter -# This allows LinxuGSM to select either ~/.steam or ~/Steam. depending on what is being used - -steamappsfile=$(find ${HOME} -name appworkshop_346110.acf) -steamappsdir=$(dirname "${steamappsfile}") -steamappspath=$(cd ${steamappsdir};cd ../;pwd) - -# removes the symlink if exists. -# fixes issue with older versions of LinuxGSM linking to /home/arkserver/steamcmd -if [ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]; then - fixname="broken SteamCMD symlink" +# removes mulitple appworkshop_346110.acf if found. +steamappsfilewc=$(find ${HOME} -name appworkshop_346110.acf | wc -l) +if [ "${steamappsfilewc}" -gt "1" ]; then + fixname="multiple appworkshop acf files" fn_fix_msg_start - unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux" + find ${HOME} -name appworkshop_346110.acf -exec rm -f {} \; fn_fix_msg_end - check_steamcmd.sh -fi +elif [ "${steamappsfilewc}" -eq "1" ]; then + # Steam mods directory selecter + # This allows LinxuGSM to select either ~/.steam or ~/Steam. depending on what is being used + steamappsfile=$(find ${HOME} -name appworkshop_346110.acf) + steamappsdir=$(dirname "${steamappsfile}") + steamappspath=$(cd "${steamappsdir}"|| return; cd ../;pwd) -# removed ARK steamcmd directory if steamcmd is missing. -if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then - fixname="remove invalid ARK SteamCMD directory" - fn_fix_msg_start - rm -rf "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux" - fn_fix_msg_end - check_steamcmd.sh -fi + # removes the symlink if exists. + # fixes issue with older versions of LinuxGSM linking to /home/arkserver/steamcmd + if [ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]; then + fixname="broken SteamCMD symlink" + fn_fix_msg_start + unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux" + fn_fix_msg_end + check_steamcmd.sh + fi -# if the steamapps symlink is incorrect unlink it. -if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]&&[ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]&&[ "$(readlink ${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps)" != "${steamappspath}" ]; then - fixname="incorrect steamapps symlink" - fn_fix_msg_start - unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" - fn_fix_msg_end -fi + # removed ARK steamcmd directory if steamcmd is missing. + if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then + fixname="remove invalid ARK SteamCMD directory" + fn_fix_msg_start + rm -rf "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux" + fn_fix_msg_end + check_steamcmd.sh + fi -# Put symlink to steamapps directory into the ARK SteamCMD directory to link the downloaded mods to the correct location. -if [ ! -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]; then - fixname="steamapps symlink" - fn_fix_msg_start - ln -s "${steamappspath}" "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" - fn_fix_msg_end + # if the steamapps symlink is incorrect unlink it. + if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]&&[ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]&&[ "$(readlink ${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps)" != "${steamappspath}" ]; then + fixname="incorrect steamapps symlink" + fn_fix_msg_start + unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" + fn_fix_msg_end + fi + + # Put symlink to steamapps directory into the ARK SteamCMD directory to link the downloaded mods to the correct location. + if [ ! -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]; then + fixname="steamapps symlink" + fn_fix_msg_start + ln -s "${steamappspath}" "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" + fn_fix_msg_end + fi fi From 0af223d4367faa39588267cea63134fe566c666f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Apr 2020 07:22:44 +0100 Subject: [PATCH 12/96] feat(ut3server): add monitor query and add minor ut3 improvements (#2853) * added ut3 to gsquery * updated details * added gamespy login information * corrected maxplayers --- .../config-lgsm/ut3server/_default.cfg | 15 ++++++++++----- lgsm/functions/info_config.sh | 5 ++++- lgsm/functions/info_parms.sh | 2 -- lgsm/functions/query_gsquery.py | 5 ++++- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index 2a2c8a518..b42227859 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -14,18 +14,23 @@ port="7777" queryport="6500" defaultmap="VCTF-Suspense" game="UTGameContent.UTVehicleCTFGame_Content" -mutators="" #"UTGame.UTMutator_Instagib,UTGame.UTMutator_LowGrav" +# Example: mutators="UTGame.UTMutator_Instagib,UTGame.UTMutator_LowGrav" +mutators="" isdedicated="true" islanmatch="false" usesstats="false" shouldadvertise="true" pureserver="1" allowjoininprogress="true" +# Required: GameSpy Username and password +# https://docs.linuxgsm.com/game-servers/unreal-tournament-3#server-gamespy-login +gsusername="" +gspassword="" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# Edit with care | List of game types and mutators : https://docs.linuxgsm.com/game-servers/unreal-tournament-3 +# Edit with care | List of game types and mutators: https://docs.linuxgsm.com/game-servers/unreal-tournament-3 fn_parms(){ -parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?Mutator=${mutators}?ConfigSubDir=${selfname} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" +parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?Mutator=${mutators}?ConfigSubDir=${selfname} -login=${gsusername} -password=${gspassword} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" } #### LinuxGSM Settings #### @@ -130,8 +135,8 @@ stopmode="2" # 3: gamedig # 4: gsquery # 5: tcp -querymode="1" -querytype="" +querymode="2" +querytype="ut3" ## Game Server Details # Do not edit diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 452a0620a..75d248ba4 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -1046,13 +1046,16 @@ fn_info_config_unreal3(){ servername="${unavailable}" serverpassword="${unavailable}" adminpassword="${unavailable}" + maxplayers="${unavailable}" webadminenabled="${unavailable}" webadminport="${zero}" webadminuser="${unavailable}" webadminpass="${unavailable}" else servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') webadminenabled=$(grep "bEnabled" "${servercfgdir}/UTWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') webadminport=$(grep "ListenPort" "${servercfgdir}/UTWeb.ini" | grep -v "#" | tr -cd '[:digit:]') webadminuser="Admin" @@ -1062,7 +1065,7 @@ fn_info_config_unreal3(){ servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} adminpassword=${adminpassword:-"NOT SET"} - port=${port:-"0"} + maxplayers=${maxplayers:-"NOT SET"} webadminenabled=${webadminenabled:-"NOT SET"} webadminport=${webadminport:-"0"} webadminuser=${webadminuser:-"NOT SET"} diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 9cb56bb58..870cffd2a 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -207,8 +207,6 @@ fn_info_parms_unreal3(){ port=${port:-"0"} queryport=${queryport:-"0"} defaultmap=${defaultmap:-"NOT SET"} - serverpassword=${serverpassword:-"NOT SET"} - adminpassword=${adminpassword:-"NOT SET"} } fn_info_parms_unturned(){ diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py index fea94dc6b..376f704b7 100644 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/functions/query_gsquery.py @@ -28,6 +28,7 @@ class gsquery: twquery=['teeworlds'] unrealquery=['protocol-gamespy1','unreal'] unreal2query=['protocol-unreal2','unreal2'] + unreal3query=['ut3','unreal3'] if self.option.engine in sourcequery: self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine in idtech2query: @@ -50,6 +51,8 @@ class gsquery: self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C' elif self.option.engine in unreal2query: self.query_prompt_string = b'\x79\x00\x00\x00\x00' + elif self.option.engine in unreal3query: + self.query_prompt_string = b'\xFE\xFD\x09\x00\x00\x00\x00' self.connected = False self.response = None @@ -119,7 +122,7 @@ if __name__ == '__main__': action='store', dest='engine', default=False, - help='Engine type: protocol-valve protocol-quake3 protocol-quake3 protocol-gamespy1 protocol-unreal2 minecraft minecraftbe jc2mp mumbleping soldat teeworlds' + help='Engine type: protocol-valve protocol-quake3 protocol-quake3 protocol-gamespy1 protocol-unreal2 ut3 minecraft minecraftbe jc2mp mumbleping soldat teeworlds' ) parser.add_option( '-v', '--verbose', From 66bf5e059e96ec8445fa5ee877c525292364b5cb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 3 May 2020 00:02:21 +0100 Subject: [PATCH 13/96] feat(log): refactor log handling (#2859) * standardise module identifiers * renamed logs.sh to core_logs.sh * improve stats log * remove local * functionselfname rename --- lgsm/functions/alert.sh | 43 +++++++++--------- lgsm/functions/alert_discord.sh | 4 +- lgsm/functions/alert_email.sh | 4 +- lgsm/functions/alert_ifttt.sh | 4 +- lgsm/functions/alert_mailgun.sh | 4 +- lgsm/functions/alert_pushbullet.sh | 4 +- lgsm/functions/alert_pushover.sh | 4 +- lgsm/functions/alert_slack.sh | 4 +- lgsm/functions/alert_telegram.sh | 4 +- lgsm/functions/check.sh | 44 +++++++++---------- lgsm/functions/check_config.sh | 3 +- lgsm/functions/check_deps.sh | 16 +++---- lgsm/functions/check_executable.sh | 3 +- lgsm/functions/check_glibc.sh | 2 +- lgsm/functions/check_ip.sh | 14 +++--- lgsm/functions/check_last_update.sh | 2 + lgsm/functions/check_logs.sh | 3 +- lgsm/functions/check_permissions.sh | 4 +- lgsm/functions/check_root.sh | 5 +-- lgsm/functions/check_status.sh | 3 +- lgsm/functions/check_steamcmd.sh | 10 ++--- lgsm/functions/check_system_dir.sh | 5 +-- lgsm/functions/check_system_requirements.sh | 3 +- lgsm/functions/check_tmuxception.sh | 2 +- lgsm/functions/command_backup.sh | 6 +-- lgsm/functions/command_console.sh | 6 +-- lgsm/functions/command_debug.sh | 6 +-- lgsm/functions/command_details.sh | 6 +-- lgsm/functions/command_dev_clear_functions.sh | 6 +++ lgsm/functions/command_dev_debug.sh | 6 +-- lgsm/functions/command_dev_detect_deps.sh | 12 ++--- lgsm/functions/command_dev_detect_glibc.sh | 8 ++-- lgsm/functions/command_dev_detect_ldd.sh | 6 +-- lgsm/functions/command_dev_query_raw.sh | 6 +-- lgsm/functions/command_donate.sh | 6 +-- lgsm/functions/command_fastdl.sh | 8 ++-- lgsm/functions/command_install.sh | 6 +-- .../command_install_resources_mta.sh | 6 +-- lgsm/functions/command_mods_install.sh | 6 +-- lgsm/functions/command_mods_remove.sh | 6 +-- lgsm/functions/command_mods_update.sh | 6 +-- lgsm/functions/command_monitor.sh | 23 +++++----- lgsm/functions/command_postdetails.sh | 34 +++++++------- lgsm/functions/command_restart.sh | 6 +-- lgsm/functions/command_start.sh | 8 ++-- lgsm/functions/command_stop.sh | 6 +-- lgsm/functions/command_test_alert.sh | 6 +-- lgsm/functions/command_ts3_server_pass.sh | 6 +-- lgsm/functions/command_update.sh | 8 ++-- lgsm/functions/command_update_functions.sh | 13 ------ lgsm/functions/command_update_linuxgsm.sh | 6 +-- lgsm/functions/command_validate.sh | 6 +-- lgsm/functions/command_wipe.sh | 6 +-- lgsm/functions/compress_unreal2_maps.sh | 5 ++- lgsm/functions/compress_ut99_maps.sh | 5 ++- lgsm/functions/core_dl.sh | 6 +-- lgsm/functions/core_exit.sh | 16 ++++--- lgsm/functions/core_functions.sh | 4 +- lgsm/functions/core_getopt.sh | 2 +- lgsm/functions/core_legacy.sh | 2 + lgsm/functions/{logs.sh => core_logs.sh} | 7 ++- lgsm/functions/core_messages.sh | 26 ++++++----- lgsm/functions/core_trap.sh | 2 + lgsm/functions/fix.sh | 7 ++- lgsm/functions/fix_ark.sh | 2 + lgsm/functions/fix_arma3.sh | 4 +- lgsm/functions/fix_av.sh | 3 +- lgsm/functions/fix_csgo.sh | 4 +- lgsm/functions/fix_dst.sh | 4 +- lgsm/functions/fix_ges.sh | 3 +- lgsm/functions/fix_hw.sh | 2 + lgsm/functions/fix_ins.sh | 5 +-- lgsm/functions/fix_kf.sh | 4 +- lgsm/functions/fix_kf2.sh | 4 +- lgsm/functions/fix_mcb.sh | 3 +- lgsm/functions/fix_mta.sh | 4 +- lgsm/functions/fix_nmrih.sh | 3 +- lgsm/functions/fix_onset.sh | 4 +- lgsm/functions/fix_ro.sh | 4 +- lgsm/functions/fix_rust.sh | 3 +- lgsm/functions/fix_rw.sh | 3 +- lgsm/functions/fix_sdtd.sh | 3 +- lgsm/functions/fix_sfc.sh | 4 +- lgsm/functions/fix_sof2.sh | 4 +- lgsm/functions/fix_ss3.sh | 4 +- lgsm/functions/fix_steamcmd.sh | 4 +- lgsm/functions/fix_terraria.sh | 4 +- lgsm/functions/fix_tf2.sh | 4 +- lgsm/functions/fix_ts3.sh | 4 +- lgsm/functions/fix_tu.sh | 2 + lgsm/functions/fix_unt.sh | 3 +- lgsm/functions/fix_ut.sh | 4 +- lgsm/functions/fix_ut2k4.sh | 4 +- lgsm/functions/fix_ut3.sh | 4 +- lgsm/functions/fix_wurm.sh | 3 +- lgsm/functions/fix_zmr.sh | 4 +- lgsm/functions/info_config.sh | 2 +- lgsm/functions/info_distro.sh | 2 +- lgsm/functions/info_messages.sh | 6 ++- lgsm/functions/info_parms.sh | 2 +- lgsm/functions/install_complete.sh | 4 +- lgsm/functions/install_config.sh | 4 +- lgsm/functions/install_dst_token.sh | 4 +- lgsm/functions/install_eula.sh | 4 +- lgsm/functions/install_factorio_save.sh | 3 +- lgsm/functions/install_gslt.sh | 4 +- lgsm/functions/install_header.sh | 4 +- lgsm/functions/install_logs.sh | 4 +- lgsm/functions/install_mta_resources.sh | 4 +- lgsm/functions/install_retry.sh | 4 +- lgsm/functions/install_server_dir.sh | 4 +- lgsm/functions/install_server_files.sh | 4 +- lgsm/functions/install_squad_license.sh | 4 +- lgsm/functions/install_stats.sh | 4 +- lgsm/functions/install_steamcmd.sh | 3 +- lgsm/functions/install_ts3db.sh | 4 +- lgsm/functions/install_ut2k4_key.sh | 4 +- lgsm/functions/mods_core.sh | 4 +- lgsm/functions/mods_list.sh | 4 +- lgsm/functions/query_gamedig.sh | 2 + lgsm/functions/update_factorio.sh | 4 +- lgsm/functions/update_minecraft.sh | 4 +- lgsm/functions/update_minecraft_bedrock.sh | 4 +- lgsm/functions/update_mta.sh | 4 +- lgsm/functions/update_mumble.sh | 4 +- lgsm/functions/update_steamcmd.sh | 6 +-- lgsm/functions/update_ts3.sh | 4 +- linuxgsm.sh | 1 + 128 files changed, 322 insertions(+), 427 deletions(-) rename lgsm/functions/{logs.sh => core_logs.sh} (95%) diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index f76500105..5f8fe156e 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -4,8 +4,7 @@ # Website: https://linuxgsm.com # Description: Overall function for managing alerts. -local modulename="ALERT" -local commandaction="Alert" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_alert_log(){ info_distro.sh @@ -100,23 +99,23 @@ fn_alert_log if [ "${postalert}" == "on" ]&&[ -n "${postalert}" ]; then exitbypass=1 command_postdetails.sh -elif [ "${postalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ "${postalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "More Info not enabled" fn_script_log_warn "More Info alerts not enabled" -elif [ -z "${posttarget}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ -z "${posttarget}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "posttarget not set" fn_script_error "posttarget not set" -elif [ -z "${postdays}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ -z "${postdays}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "postdays not set" fn_script_error "postdays not set" fi if [ "${discordalert}" == "on" ]&&[ -n "${discordalert}" ]; then alert_discord.sh -elif [ "${discordalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ "${discordalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Discord alerts not enabled" fn_script_log_warn "Discord alerts not enabled" -elif [ -z "${discordtoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ -z "${discordtoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Discord token not set" echo -e "* https://docs.linuxgsm.com/alerts/discord" fn_script_error "Discord token not set" @@ -124,20 +123,20 @@ fi if [ "${emailalert}" == "on" ]&&[ -n "${email}" ]; then alert_email.sh -elif [ "${emailalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ "${emailalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Email alerts not enabled" fn_script_log_warn "Email alerts not enabled" -elif [ -z "${email}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ -z "${email}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Email not set" fn_script_log_error "Email not set" fi if [ "${iftttalert}" == "on" ]&&[ -n "${iftttalert}" ]; then alert_ifttt.sh -elif [ "${iftttalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ "${iftttalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "IFTTT alerts not enabled" fn_script_log_warn "IFTTT alerts not enabled" -elif [ -z "${ifttttoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ -z "${ifttttoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "IFTTT token not set" echo -e "* https://docs.linuxgsm.com/alerts/ifttt" fn_script_error "IFTTT token not set" @@ -145,10 +144,10 @@ fi if [ "${mailgunalert}" == "on" ]&&[ -n "${mailgunalert}" ]; then alert_mailgun.sh -elif [ "${mailgunalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ "${mailgunalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Mailgun alerts not enabled" fn_script_log_warn "Mailgun alerts not enabled" -elif [ -z "${mailguntoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ -z "${mailguntoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Mailgun token not set" echo -e "* https://docs.linuxgsm.com/alerts/mailgun" fn_script_error "Mailgun token not set" @@ -156,10 +155,10 @@ fi if [ "${pushbulletalert}" == "on" ]&&[ -n "${pushbullettoken}" ]; then alert_pushbullet.sh -elif [ "${pushbulletalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ "${pushbulletalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Pushbullet alerts not enabled" fn_script_log_warn "Pushbullet alerts not enabled" -elif [ -z "${pushbullettoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ -z "${pushbullettoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Pushbullet token not set" echo -e "* https://docs.linuxgsm.com/alerts/pushbullet" fn_script_error "Pushbullet token not set" @@ -167,10 +166,10 @@ fi if [ "${pushoveralert}" == "on" ]&&[ -n "${pushoveralert}" ]; then alert_pushover.sh -elif [ "${pushoveralert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ "${pushoveralert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Pushover alerts not enabled" fn_script_log_warn "Pushover alerts not enabled" -elif [ -z "${pushovertoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ -z "${pushovertoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Pushover token not set" echo -e "* https://docs.linuxgsm.com/alerts/pushover" fn_script_error "Pushover token not set" @@ -178,14 +177,14 @@ fi if [ "${telegramalert}" == "on" ]&&[ -n "${telegramtoken}" ]; then alert_telegram.sh -elif [ "${telegramalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ "${telegramalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Telegram Messages not enabled" fn_script_log_warn "Telegram Messages not enabled" -elif [ -z "${telegramtoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ -z "${telegramtoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Telegram token not set." echo -e "* https://docs.linuxgsm.com/alerts/telegram" fn_script_error "Telegram token not set." -elif [ -z "${telegramchatid}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ -z "${telegramchatid}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Telegram chat id not set." echo -e "* https://docs.linuxgsm.com/alerts/telegram" fn_script_error "Telegram chat id not set." @@ -193,10 +192,10 @@ fi if [ "${slackalert}" == "on" ]&&[ -n "${slackalert}" ]; then alert_slack.sh -elif [ "${slackalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ "${slackalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Slack alerts not enabled" fn_script_log_warn "Slack alerts not enabled" -elif [ -z "${slacktoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then +elif [ -z "${slacktoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_error_nl "Slack token not set" echo -e "* https://docs.linuxgsm.com/alerts/slack" fn_script_error "Slack token not set" diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh index c088df281..3ed12fe97 100644 --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/functions/alert_discord.sh @@ -5,9 +5,7 @@ # Website: https://linuxgsm.com # Description: Sends Discord alert. -local modulename="ALERT" -local commandaction="Alert" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if ! command -v jq > /dev/null; then fn_print_fail_nl "Sending Discord alert: jq is missing." diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index 398ecc3e8..f69f8f408 100644 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/functions/alert_email.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Sends email alert. -local modulename="ALERT" -local commandaction="Alert" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_dots "Sending Email alert: ${email}" fn_sleep_time diff --git a/lgsm/functions/alert_ifttt.sh b/lgsm/functions/alert_ifttt.sh index 0e983e2dc..376dfed3a 100644 --- a/lgsm/functions/alert_ifttt.sh +++ b/lgsm/functions/alert_ifttt.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Sends IFTTT alert. -local modulename="ALERT" -local commandaction="Alert" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" json=$(cat < /dev/null; then fn_print_fail_nl "Sending Slack alert: jq is missing." diff --git a/lgsm/functions/alert_telegram.sh b/lgsm/functions/alert_telegram.sh index 90e2708f3..33662b756 100644 --- a/lgsm/functions/alert_telegram.sh +++ b/lgsm/functions/alert_telegram.sh @@ -4,9 +4,7 @@ # Website: https://bytegaming.de # Description: Sends Telegram Messenger alert. -local modulename="ALERT" -local commandaction="Alert" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" json=$(cat </dev/null | grep -Ecx "^${selfname}") diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 1c99e282e..b8dbffd87 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -4,7 +4,7 @@ # Website: https://linuxgsm.com # Description: Checks if SteamCMD is installed correctly. -local modulename="CHECK" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_steamcmd(){ if [ ${shortname} == "ark" ]&&[ "${installsteamcmd}" == "1" ]; then @@ -50,14 +50,14 @@ fn_check_steamcmd(){ # Checks if SteamCMD exists when starting or updating a server. # Only install if steamcmd package is missing or steamcmd dir is missing. if [ ! -f "${steamcmddir}/steamcmd.sh" ]&&[ -z "$(command -v steamcmd 2>/dev/null)" ]; then - if [ "${function_selfname}" == "command_install.sh" ]; then + if [ "${commandname}" == "INSTALL" ]; then fn_install_steamcmd else fn_print_warn_nl "SteamCMD is missing" fn_script_log_warn "SteamCMD is missing" fn_install_steamcmd fi - elif [ "${function_selfname}" == "command_install.sh" ]; then + elif [ "${commandname}" == "INSTALL" ]; then fn_print_information "SteamCMD is already installed..." fn_print_ok_eol_nl fi @@ -110,14 +110,14 @@ fn_check_steamcmd_ark(){ # to allow ark mods to work if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then installsteamcmd=1 - if [ "${function_selfname}" == "command_install.sh" ]; then + if [ "${commandname}" == "INSTALL" ]; then fn_install_steamcmd else fn_print_warn_nl "ARK mods SteamCMD is missing" fn_script_log_warn "ARK mods SteamCMD is missing" fn_install_steamcmd fi - elif [ "${function_selfname}" == "command_install.sh" ]; then + elif [ "${commandname}" == "INSTALL" ]; then fn_print_information "ARK mods SteamCMD is already installed..." fn_print_ok_eol_nl fi diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/functions/check_system_dir.sh index 9a4863a5a..ce7ff5ba5 100644 --- a/lgsm/functions/check_system_dir.sh +++ b/lgsm/functions/check_system_dir.sh @@ -4,10 +4,9 @@ # Website: https://linuxgsm.com # Description: Checks if systemdir/serverfiles is accessible. -local modulename="CHECK" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -if [ "${function_selfname}" != "command_validate.sh" ]; then +if [ "${commandname}" != "VALIDATE" ]; then checkdir="${serverfiles}" else checkdir="${systemdir}" diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh index 139b2b6af..8b7db5a3c 100644 --- a/lgsm/functions/check_system_requirements.sh +++ b/lgsm/functions/check_system_requirements.sh @@ -5,8 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks RAM requirements -local modulename="CHECK" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_distro.sh diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/functions/check_tmuxception.sh index 06cb40de1..4f5fd2e29 100644 --- a/lgsm/functions/check_tmuxception.sh +++ b/lgsm/functions/check_tmuxception.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Checks if run from tmux or screen -local modulename="CHECK" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_check_is_in_tmux(){ if [ "${TMUX}" ]; then diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index d4befa46c..7666156d4 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Creates a .tar.gz file in the backup directory. -local modulename="BACKUP" -local commandaction="Backup" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="BACKUP" +commandaction="Backing up" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" check.sh diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index 16578600c..c3e3257be 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -4,9 +4,9 @@ # Website: https://linuxgsm.com # Description: Gives access to the server tmux console. -local modulename="CONSOLE" -local commandaction="Console" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="CONSOLE" +commandaction="Access console" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" check.sh fn_print_header diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 9da7ae95c..5aeb0d5e1 100644 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -4,9 +4,9 @@ # Website: https://linuxgsm.com # Description: Runs the server without tmux and directly from the terminal. -local modulename="DEBUG" -local commandaction="Debug" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="DEBUG" +commandaction="Debuging" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Trap to remove lockfile on quit. fn_lockfile_trap(){ diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 02726f197..c2abc0ba0 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Displays server information. -local modulename="DETAILS" -local commandaction="Details" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="DETAILS" +commandaction="Viewing details" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Run checks and gathers details to display. check.sh diff --git a/lgsm/functions/command_dev_clear_functions.sh b/lgsm/functions/command_dev_clear_functions.sh index 51878a381..0c2faa375 100644 --- a/lgsm/functions/command_dev_clear_functions.sh +++ b/lgsm/functions/command_dev_clear_functions.sh @@ -4,6 +4,10 @@ # Website: https://linuxgsm.com # Description: Deletes the contents of the functions dir. +commandname="DEV-CLEAR-MODULES" +commandaction="Clearing modules" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + echo -e "=================================" echo -e "Clear Functions" echo -e "=================================" @@ -11,6 +15,8 @@ echo -e "" if fn_prompt_yn "Do you want to delete all functions?" Y; then rm -rfv "${functionsdir:?}/"* rm -rfv "${configdirdefault:?}/"* + fn_script_log_info "Cleared modules directory" + fn_script_log_info "Cleared default config directory" fi core_exit.sh diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh index f17b67fe2..962b01e7f 100644 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/functions/command_dev_debug.sh @@ -4,9 +4,9 @@ # Website: https://linuxgsm.com # Description: Dev only: Enables debugging log to be saved to dev-debug.log. -local modulename="DEV-DEBUG" -local commandaction="Dev Debug" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="DEV-DEBUG" +commandaction="Developer debug" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ -f "${rootdir}/.dev-debug" ]; then rm "${rootdir:?}/.dev-debug" diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index 79770044d..04f37d696 100644 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -4,9 +4,9 @@ # Website: https://linuxgsm.com # Description: Detects dependencies the server binary requires. -local modulename="DETECT-DEPS" -local commandaction="Detect Deps" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="DEV-DETECT-DEPS" +commandaction="Developer detect deps" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "=================================" echo -e "Dependencies Checker" @@ -40,7 +40,7 @@ touch "${tmpdir}/.depdetect_debian_list" while read -r lib; do echo -e "${lib}" - local libs_array=( libm.so.6 libc.so.6 libtcmalloc_minimal.so.4 libpthread.so.0 libdl.so.2 libnsl.so.1 libgcc_s.so.1 librt.so.1 ld-linux.so.2 libdbus-glib-1.so.2 libgio-2.0.so.0 libglib-2.0.so.0 libGL.so.1 libgobject-2.0.so.0 libnm-glib.so.4 libnm-util.so.2 ) + libs_array=( libm.so.6 libc.so.6 libtcmalloc_minimal.so.4 libpthread.so.0 libdl.so.2 libnsl.so.1 libgcc_s.so.1 librt.so.1 ld-linux.so.2 libdbus-glib-1.so.2 libgio-2.0.so.0 libglib-2.0.so.0 libGL.so.1 libgobject-2.0.so.0 libnm-glib.so.4 libnm-util.so.2 ) for lib_file in "${libs_array[@]}" do if [ "${lib}" == "${lib_file}" ]; then @@ -51,7 +51,7 @@ while read -r lib; do fi done - local libs_array=( libawt.so libjava.so libjli.so libjvm.so libnet.so libnio.so libverify.so ) + libs_array=( libawt.so libjava.so libjli.so libjvm.so libnet.so libnio.so libverify.so ) for lib_file in "${libs_array[@]}" do if [ "${lib}" == "${lib_file}" ]; then @@ -62,7 +62,7 @@ while read -r lib; do fi done - local libs_array=( libtier0.so libtier0_srv.so libvstdlib_srv.so Core.so libvstdlib.so libtier0_s.so Editor.so Engine.so liblua.so libsteam_api.so ld-linux-x86-64.so.2 libPhysX3_x86.so libPhysX3Common_x86.so libPhysX3Cooking_x86.so) + libs_array=( libtier0.so libtier0_srv.so libvstdlib_srv.so Core.so libvstdlib.so libtier0_s.so Editor.so Engine.so liblua.so libsteam_api.so ld-linux-x86-64.so.2 libPhysX3_x86.so libPhysX3Common_x86.so libPhysX3Cooking_x86.so) for lib_file in "${libs_array[@]}" do # Known shared libs what dont requires dependencies. diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh index 49d7cc55a..2289bb818 100644 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ b/lgsm/functions/command_dev_detect_glibc.sh @@ -5,9 +5,9 @@ # Description: Automatically detects the version of GLIBC that is required. # Can check a file or directory recursively. -local modulename="DETECT-GLIBC" -local commandaction="Detect Glibc" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="DEV-DETECT-GLIBC" +commandaction="Developer detect glibc" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "=================================" echo -e "glibc Requirements Checker" @@ -33,7 +33,7 @@ fi echo -e "" -local glibc_check_dir_array=( steamcmddir serverfiles ) +glibc_check_dir_array=( steamcmddir serverfiles ) for glibc_check_var in "${glibc_check_dir_array[@]}" do if [ "${glibc_check_var}" == "serverfiles" ]; then diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/functions/command_dev_detect_ldd.sh index 919900de1..850845179 100644 --- a/lgsm/functions/command_dev_detect_ldd.sh +++ b/lgsm/functions/command_dev_detect_ldd.sh @@ -5,9 +5,9 @@ # Description: Automatically detects required deps using ldd. # Can check a file or directory recursively. -local modulename="DETECT-LDD" -local commandaction="Detect LDD" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="DEV-DETECT-LDD" +commandaction="Developer detect ldd" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "=================================" echo -e "Shared Object dependencies Checker" diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index 0f5e5c8e2..cdd539ce9 100644 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -4,9 +4,9 @@ # Website: https://linuxgsm.com # Description: Raw gamedig output of the server. -local modulename="QUERY-RAW" -local commandaction="Query Raw" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="DEV-QUERY-RAW" +commandaction="Developer query raw" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" check.sh info_config.sh diff --git a/lgsm/functions/command_donate.sh b/lgsm/functions/command_donate.sh index 726ac1b60..9bb7f2faf 100644 --- a/lgsm/functions/command_donate.sh +++ b/lgsm/functions/command_donate.sh @@ -4,9 +4,9 @@ # Website: https://linuxgsm.com # Description: Shows ways to donate. -local modulename="CONSOLE" -local commandaction="Console" -local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") +commandname="DONATE" +commandaction="Donate" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_ascii_logo echo -e "${lightyellow}Support LinuxGSM${default}" diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index 4e0007fd8..335d02d9d 100644 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Creates a FastDL directory. -local modulename="FASTDL" -local commandaction="FastDL" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="FASTDL" +commandaction="Fastdl" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" check.sh @@ -135,7 +135,7 @@ fn_human_readable_file_size(){ local factor="${item%:*}" local abbrev="${item#*:}" if [[ "${bytes}" -ge "${factor}" ]]; then - local size=$(bc -l <<< "${bytes} / ${factor}") + size=$(bc -l <<< "${bytes} / ${factor}") printf "%.*f %s\n" "${precision}" "${size}" "${abbrev}" break fi diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index 65b22de70..9a6b64e98 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Overall function for the installer. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="INSTALL" +commandaction="Installing" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" check.sh if [ "$(whoami)" = "root" ]; then diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 3d75824f7..0a9ac7806 100644 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -4,9 +4,9 @@ # Website: https://linuxgsm.com # Description: Installs the default resources for Multi Theft Auto. -local modulename="DEFAULT_RESOURCES" -local commandaction="Default Resources" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="DEFAULT-RESOURCES" +commandaction="Default Resources" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_resources(){ echo -e "" diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh index 971db3314..d3c517461 100644 --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/functions/command_mods_install.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: List and installs available mods along with mods_list.sh and mods_core.sh. -local modulename="MODS" -local commandaction="addons/mods" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="MODS-INSTALL" +commandaction="Installing mods" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" check.sh mods_core.sh diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh index 61289b60e..a8149e07b 100644 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/functions/command_mods_remove.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Uninstall mods along with mods_list.sh and mods_core.sh. -local modulename="MODS" -local commandaction="Mods Remove" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="MODS-REMOVE" +commandaction="Removing mods" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" check.sh mods_core.sh diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh index 44ff4d9b4..165b4ea98 100644 --- a/lgsm/functions/command_mods_update.sh +++ b/lgsm/functions/command_mods_update.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Updates installed mods along with mods_list.sh and mods_core.sh. -local modulename="MODS" -local commandaction="Mods Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="MODS-UPDATE" +commandaction="Updating mods" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" check.sh mods_core.sh diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 98f018cf4..1df51768f 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -6,9 +6,9 @@ # Description: Monitors server by checking for running processes # then passes to gamedig and gsquery. -local modulename="MONITOR" -local commandaction="Monitor" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="MONITOR" +commandaction="Monitoring" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_monitor_check_lockfile(){ # Monitor does not run it lockfile is not found. @@ -141,11 +141,7 @@ for queryattempt in {1..5}; do fn_script_log_pass "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: OK" fn_sleep_time monitorpass=1 - # send LinuxGSM stats if monitor is OK. - if [ "${stats}" == "on" ]||[ "${stats}" == "y" ]; then - info_stats.sh - fi - if [ "${querystatus}" == "0" ]; then + if [ "${querystatus}" == "0" ]; then # Add query data to log. if [ "${gdname}" ]; then fn_script_log_info "Server name: ${gdname}" @@ -154,14 +150,19 @@ for queryattempt in {1..5}; do fn_script_log_info "Players: ${gdplayers}/${gdmaxplayers}" fi if [ "${gdbots}" ]; then - fn_script_log_info "Bots: ${gdbots}" - fi + fn_script_log_info "Bots: ${gdbots}" + fi if [ "${gdmap}" ]; then fn_script_log_info "Map: ${gdmap}" fi if [ "${gdgamemode}" ]; then fn_script_log_info "Game Mode: ${gdgamemode}" fi + + # send LinuxGSM stats if monitor is OK. + if [ "${stats}" == "on" ]||[ "${stats}" == "y" ]; then + info_stats.sh + fi fi core_exit.sh else @@ -239,7 +240,7 @@ fn_monitor_loop(){ monitorflag=1 check.sh -logs.sh +core_logs.sh info_config.sh info_parms.sh diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index b62cc708a..a0afa2905 100644 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Strips sensitive information out of Details output -local modulename="POSTDETAILS" -local commandaction="Postdetails" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="POST-DETAILS" +commandaction="Posting details" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Set posttarget to the appropriately-defined post destination. @@ -74,14 +74,13 @@ else fn_info_message_ports fn_info_message_select_engine fn_info_message_statusbottom - } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee -a "${postdetailslog}" > /dev/null 2>&1 + } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${postdetailslog}" > /dev/null 2>&1 fi - +# Pastebin if [ "${posttarget}" == "http://pastebin.com" ] ; then fn_print_dots "pastbin.com for ${postexpire}" # grab the return from 'value' from an initial visit to pastebin. - csrftoken=$(curl -s "${posttarget}" | - sed -n 's/^.*input type="hidden" name="csrf_token_post" value="\(.*\)".*$/\1/p') + csrftoken=$(curl -s "${posttarget}" | sed -n 's/^.*input type="hidden" name="csrf_token_post" value="\(.*\)".*$/\1/p') # # Use the csrftoken to then post the content. # @@ -94,9 +93,9 @@ if [ "${posttarget}" == "http://pastebin.com" ] ; then # Output the resulting link. fn_print_ok_nl "pastbin.com for ${postexpire}" + fn_script_log_pass "pastbin.com for ${postexpire}" pdurl="${posttarget}${link}" - echo -e "" - echo -e " Please share the following url for support: ${pdurl}" +# Hastebin elif [ "${posttarget}" == "https://hastebin.com" ] ; then fn_print_dots "hastebin.com" # hastebin is a bit simpler. If successful, the returned result @@ -104,21 +103,20 @@ elif [ "${posttarget}" == "https://hastebin.com" ] ; then # we need in "key". TODO - error handling. -CedarLUG link=$(curl -H "HTTP_X_REQUESTED_WITH:XMLHttpRequest" -s -d "$(<${postdetailslog})" "${posttarget}/documents" | cut -d\" -f4) fn_print_ok_nl "hastebin.com for ${postexpire}" + fn_script_log_pass "hastebin.com for ${postexpire}" pdurl="${posttarget}/${link}" - echo -e "" - echo -e "Please share the following url for support: ${pdurl}" +# Termbin elif [ "${posttarget}" == "https://termbin.com" ] ; then fn_print_dots "termbin.com" link=$(cat "${postdetailslog}" | nc termbin.com 9999 | tr -d '\n\0') - fn_print_ok_nl "termbin.com" + fn_print_ok_nl "termbin.com for 30D" + fn_script_log_pass "termbin.com for 30D" pdurl="${link}" - echo -e "" - echo -e "Please share the following url for support: " - echo -e "${pdurl}" -else - fn_print_warn_nl "Review output in: ${postdetailslog}" - core_exit.sh fi +echo -e "" +echo -e "Please share the following url for support: " +echo -e "${pdurl}" +fn_script_log_info "${pdurl}" if [ -z "${exitbypass}" ]; then core_exit.sh diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh index c127d21b4..8a08c04ff 100644 --- a/lgsm/functions/command_restart.sh +++ b/lgsm/functions/command_restart.sh @@ -4,9 +4,9 @@ # Website: https://linuxgsm.com # Description: Restarts the server. -local modulename="RESTART" -local commandaction="Restarting" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="MODS-INSTALL" +commandaction="Restarting" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_config.sh exitbypass=1 diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index d1ee21e42..497ca215a 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Starts the server. -local modulename="START" -local commandaction="Starting" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="START" +commandaction="Starting" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_start_teamspeak3(){ if [ ! -f "${servercfgfullpath}" ]; then @@ -183,7 +183,7 @@ if [ -z "${fixbypass}" ]; then fix.sh fi info_config.sh -logs.sh +core_logs.sh # Will check for updates is updateonstart is yes. if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateonstart}" == "on" ]; then diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index c25714de2..3a27ba8d8 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Stops the server. -local modulename="STOP" -local commandaction="Stopping" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="STOP" +commandaction="Stopping" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Attempts graceful shutdown by sending 'CTRL+c'. fn_stop_graceful_ctrlc(){ diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh index b921babe1..5d1c11885 100644 --- a/lgsm/functions/command_test_alert.sh +++ b/lgsm/functions/command_test_alert.sh @@ -4,9 +4,9 @@ # Website: https://linuxgsm.com # Description: Sends a test alert. -local modulename="ALERT" -local commandaction="Alert" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="TEST-ALERT" +commandaction="Sending Alert" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_dots "${servername}" check.sh diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh index 91d19afeb..8ff799e6e 100644 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Changes TS3 serveradmin password. -local modulename="PASSWORD-CHANGE" -local commandaction="Password Change" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="CHANGE-PASSWORD" +commandaction="Changing password" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_serveradmin_password_prompt(){ fn_print_header diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index f54423be4..88109a147 100644 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -4,13 +4,13 @@ # Website: https://linuxgsm.com # Description: Handles updating of servers. -local modulename="UPDATE" -local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="UPDATE" +commandaction="Updating" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_dots "" check.sh -logs.sh +core_logs.sh check_last_update.sh if [ "${shortname}" == "ts3" ]; then diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index e325b781a..e69de29bb 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -1,13 +0,0 @@ -#!/bin/bash -# LinuxGSM command_update_functions.sh function -# Author: Daniel Gibbs -# Website: https://linuxgsm.com -# Description: Deletes the functions dir to allow re-downloading of functions from GitHub. -# Legacy Command - -command_update_linuxgsm.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function -} - -command_update_linuxgsm.sh diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index d141c0659..90c2f0446 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -4,9 +4,9 @@ # Website: https://linuxgsm.com # Description: Deletes the functions dir to allow re-downloading of functions from GitHub. -local modulename="UPDATE LINUXGSM" -local commandaction="Update LinuxGSM" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="UPDATE-LGSM" +commandaction="Updating LinuxGSM" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_dots "Updating LinuxGSM" check.sh diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 09b7f23b7..5ddf5ffde 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -4,9 +4,9 @@ # Website: https://linuxgsm.com # Description: Runs a server validation. -local modulename="VALIDATE" -local commandaction="Validate" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="VALIDATE" +commandaction="Validating" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_validate(){ fn_script_log_warn "Validating server: SteamCMD: Validate might overwrite some customised files" diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 55e636b07..5b5abf552 100644 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -5,9 +5,9 @@ # Website: https://linuxgsm.com # Description: Wipes server data, useful after updates for some games like Rust -local modulename="WIPE" -local commandaction="Wipe" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="WIPE" +commandaction="Wiping" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" check.sh fn_print_header diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh index 99078bfc7..3580c20c9 100644 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -4,8 +4,9 @@ # Website: https://linuxgsm.com # Description: Compresses unreal maps. -local commandaction="Unreal Map Compressor" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="MAP-COMPRESSOR" +commandaction="Compressing maps" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" check.sh fn_print_header diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh index 94b3119ab..677f5aaa2 100644 --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/functions/compress_ut99_maps.sh @@ -4,8 +4,9 @@ # Website: https://linuxgsm.com # Description: Compresses unreal maps. -local commandaction="Unreal Map Compressor" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +commandname="MAP-COMPRESSOR" +commandaction="Compressing maps" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" check.sh fn_print_header diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index ff428a909..5294b8a9d 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -17,9 +17,7 @@ # fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" # fn_fetch_file "http://example.com/file.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd" -local modulename="DOWNLOAD" -local commandaction="Download" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Emptys contents of the LinuxGSM tmpdir. fn_clear_tmp(){ @@ -42,7 +40,7 @@ fn_dl_md5(){ if [ "${md5}" != "0" ]&&[ "${md5}" != "nomd5" ]; then echo -en "verifying ${local_filename} with MD5..." fn_sleep_time - local md5sumcmd=$(md5sum "${local_filedir}/${local_filename}"|awk '{print $1;}') + md5sumcmd=$(md5sum "${local_filedir}/${local_filename}"|awk '{print $1;}') if [ "${md5sumcmd}" != "${md5}" ]; then fn_print_fail_eol_nl echo -e "${local_filename} returned MD5 checksum: ${md5sumcmd}" diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh index 5d242816c..e2b439abd 100644 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -4,10 +4,12 @@ # Website: https://linuxgsm.com # Description: Handles exiting of LinuxGSM by running and reporting an exit code. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + fn_exit_dev_debug(){ if [ -f "${rootdir}/.dev-debug" ]; then echo -e "" - echo -e "${function_selfname} exiting with code: ${exitcode}" + echo -e "${functionselfname} exiting with code: ${exitcode}" if [ -f "${rootdir}/dev-debug.log" ]; then grep "functionfile=" "${rootdir}/dev-debug.log" | sed 's/functionfile=//g' > "${rootdir}/dev-debug-function-order.log" fi @@ -26,13 +28,13 @@ elif [ "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" if [ "${exitcode}" == "1" ]; then - fn_script_log_fatal "${function_selfname} exiting with code: ${exitcode}" + fn_script_log_fatal "${functionselfname} exiting with code: ${exitcode}" elif [ "${exitcode}" == "2" ]; then - fn_script_log_error "${function_selfname} exiting with code: ${exitcode}" + fn_script_log_error "${functionselfname} exiting with code: ${exitcode}" elif [ "${exitcode}" == "3" ]; then - fn_script_log_warn "${function_selfname} exiting with code: ${exitcode}" + fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}" else - fn_script_log_warn "${function_selfname} exiting with code: ${exitcode}" + fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}" fi fn_exit_dev_debug # remove trap. @@ -41,7 +43,7 @@ elif [ "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then elif [ "${exitcode}" ]&&[ "${exitcode}" == "0" ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" - fn_script_log_pass "${function_selfname} exiting with code: ${exitcode}" + fn_script_log_pass "${functionselfname} exiting with code: ${exitcode}" fn_exit_dev_debug # remove trap. trap - INT @@ -50,7 +52,7 @@ else # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" fn_print_error "No exit code set" - fn_script_log_pass "${function_selfname} exiting with code: NOT SET" + fn_script_log_pass "${functionselfname} exiting with code: NOT SET" fn_exit_dev_debug # remove trap. trap - INT diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 29bc46f56..9a7f30e98 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -5,6 +5,8 @@ # Description: Defines all functions to allow download and execution of functions using fn_fetch_function. # This function is called first before any other function. Without this file other functions will not load. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + # Core core_dl.sh(){ @@ -541,7 +543,7 @@ fn_fetch_function } # Logs -logs.sh(){ +core_logs.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function } diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 2eccb56cb..1ddc15ce2 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -4,7 +4,7 @@ # Website: https://linuxgsm.com # Description: getopt arguments. -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Define all commands here. ## User commands | Trigger commands | Description diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index e0ea7f9b3..520287ec8 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -4,6 +4,8 @@ # Website: https://linuxgsm.com # Description: Code for backwards compatability with older versions of LinuxGSM. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + if [ -z "${serverfiles}" ]; then legacymode=1 serverfiles="${filesdir}" diff --git a/lgsm/functions/logs.sh b/lgsm/functions/core_logs.sh similarity index 95% rename from lgsm/functions/logs.sh rename to lgsm/functions/core_logs.sh index 001391778..00c4d0662 100644 --- a/lgsm/functions/logs.sh +++ b/lgsm/functions/core_logs.sh @@ -1,12 +1,11 @@ #!/bin/bash -# LinuxGSM logs.sh function +# LinuxGSM core_logs.sh function # Author: Daniel Gibbs # Contributor: UltimateByte # Website: https://linuxgsm.com # Description: Acts as a log rotator, removing old logs. -local modulename="LOGS" -local commandaction="Log-Manager" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Check if logfile variable and file exist, create logfile if it doesn't exist. if [ "${consolelog}" ]; then @@ -17,7 +16,7 @@ fi # For games not displaying a console, and having logs into their game directory. check_status.sh -if [ "${status}" != "0" ]&&[ "${function_selfname}" == "command_start.sh" ]&&[ -n "${gamelogfile}" ]; then +if [ "${status}" != "0" ]&&[ "${commandname}" == "START" ]&&[ -n "${gamelogfile}" ]; then if [ "$(find "${systemdir}" -name "gamelog*.log")" ]; then fn_print_info "Moving game logs to ${gamelogdir}" fn_script_log_info "Moving game logs to ${gamelogdir}" diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 59814f62f..fd7a4b2e4 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -5,6 +5,8 @@ # Website: https://linuxgsm.com # Description: Defines on-screen messages such as [ OK ] and how script logs look. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + # nl: new line: message is following by a new line. # eol: end of line: message is placed at the end of the current line. fn_ansi_loader(){ @@ -46,8 +48,8 @@ fn_sleep_time(){ ## Feb 28 14:56:58 ut99-server: Monitor: fn_script_log(){ if [ -d "${lgsmlogdir}" ]; then - if [ "${modulename}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${modulename}: ${1}" >> "${lgsmlog}" + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: ${1}" >> "${lgsmlog}" else echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${1}" >> "${lgsmlog}" fi @@ -58,8 +60,8 @@ fn_script_log(){ fn_script_log_pass(){ if [ -d "${lgsmlogdir}" ]; then - if [ "${modulename}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${modulename}: PASS: ${1}" >> "${lgsmlog}" + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: PASS: ${1}" >> "${lgsmlog}" else echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: PASS: ${1}" >> "${lgsmlog}" fi @@ -70,8 +72,8 @@ fn_script_log_pass(){ ## Feb 28 14:56:58 ut99-server: Monitor: FATAL: fn_script_log_fatal(){ if [ -d "${lgsmlogdir}" ]; then - if [ "${modulename}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${modulename}: FATAL: ${1}" >> "${lgsmlog}" + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: FATAL: ${1}" >> "${lgsmlog}" else echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: FATAL: ${1}" >> "${lgsmlog}" fi @@ -82,8 +84,8 @@ fn_script_log_fatal(){ ## Feb 28 14:56:58 ut99-server: Monitor: ERROR: fn_script_log_error(){ if [ -d "${lgsmlogdir}" ]; then - if [ "${modulename}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${modulename}: ERROR: ${1}" >> "${lgsmlog}" + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: ERROR: ${1}" >> "${lgsmlog}" else echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ERROR: ${1}" >> "${lgsmlog}" fi @@ -94,8 +96,8 @@ fn_script_log_error(){ ## Feb 28 14:56:58 ut99-server: Monitor: WARN: fn_script_log_warn(){ if [ -d "${lgsmlogdir}" ]; then - if [ "${modulename}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${modulename}: WARN: ${1}" >> "${lgsmlog}" + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: WARN: ${1}" >> "${lgsmlog}" else echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: WARN: ${1}" >> "${lgsmlog}" fi @@ -106,8 +108,8 @@ fn_script_log_warn(){ ## Feb 28 14:56:58 ut99-server: Monitor: INFO: fn_script_log_info(){ if [ -d "${lgsmlogdir}" ]; then - if [ "${modulename}" ]; then - echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${modulename}: INFO: ${1}" >> "${lgsmlog}" + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: INFO: ${1}" >> "${lgsmlog}" else echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: INFO: ${1}" >> "${lgsmlog}" fi diff --git a/lgsm/functions/core_trap.sh b/lgsm/functions/core_trap.sh index 4c9db3579..f943c5c33 100644 --- a/lgsm/functions/core_trap.sh +++ b/lgsm/functions/core_trap.sh @@ -4,6 +4,8 @@ # Website: https://linuxgsm.com # Description: Handles CTRL-C trap to give an exit code. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + fn_exit_trap(){ echo -e "" core_exit.sh diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index b5c278847..74523ee5c 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -5,8 +5,7 @@ # Description: Overall function for managing fixes. # Runs functions that will fix an issue. -local modulename="FIX" -local commandaction="Fix" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Messages that are displayed for some fixes. fn_fix_msg_start(){ @@ -32,7 +31,7 @@ fn_fix_msg_end(){ } # Fixes that are run on start. -if [ "${function_selfname}" != "command_install.sh" ]&&[ -z "${fixbypass}" ]; then +if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then if [ "${appid}" ]; then fix_steamcmd.sh fi @@ -89,7 +88,7 @@ if [ "${function_selfname}" != "command_install.sh" ]&&[ -z "${fixbypass}" ]; th fi # Fixes that are run on install only. -if [ "${function_selfname}" == "command_install.sh" ]; then +if [ "${commandname}" == "INSTALL" ]; then if [ "${shortname}" == "av" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then echo -e "" echo -e "Applying Post-Install Fixes" diff --git a/lgsm/functions/fix_ark.sh b/lgsm/functions/fix_ark.sh index 67e20d495..3c1355b1e 100644 --- a/lgsm/functions/fix_ark.sh +++ b/lgsm/functions/fix_ark.sh @@ -4,6 +4,8 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with ARK: Survival Evolved. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + # removes mulitple appworkshop_346110.acf if found. steamappsfilewc=$(find ${HOME} -name appworkshop_346110.acf | wc -l) if [ "${steamappsfilewc}" -gt "1" ]; then diff --git a/lgsm/functions/fix_arma3.sh b/lgsm/functions/fix_arma3.sh index 60dd4db25..f71fcde7b 100644 --- a/lgsm/functions/fix_arma3.sh +++ b/lgsm/functions/fix_arma3.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves an issue with ARMA3. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: 20150 Segmentation fault (core dumped) error. if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3" ]||[ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" ]; then diff --git a/lgsm/functions/fix_av.sh b/lgsm/functions/fix_av.sh index fcbab6b13..bf9ff2b4b 100644 --- a/lgsm/functions/fix_av.sh +++ b/lgsm/functions/fix_av.sh @@ -4,8 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves startup issue with Avorion -local commandname="FIX" -local commandaction="Fix" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" diff --git a/lgsm/functions/fix_csgo.sh b/lgsm/functions/fix_csgo.sh index f1f9c9241..6b213d388 100644 --- a/lgsm/functions/fix_csgo.sh +++ b/lgsm/functions/fix_csgo.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with CS:GO. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: server not always creating steam_appid.txt file. if [ ! -f "${serverfiles}/steam_appid.txt" ]; then diff --git a/lgsm/functions/fix_dst.sh b/lgsm/functions/fix_dst.sh index ca86bdd4f..b203e1cd8 100644 --- a/lgsm/functions/fix_dst.sh +++ b/lgsm/functions/fix_dst.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Don't Starve Together. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer). # Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS. diff --git a/lgsm/functions/fix_ges.sh b/lgsm/functions/fix_ges.sh index bbd08c645..6065f9ba8 100644 --- a/lgsm/functions/fix_ges.sh +++ b/lgsm/functions/fix_ges.sh @@ -4,8 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with GoldenEye: Source. -local modulename="FIX" -local commandaction="Fix" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: MALLOC_CHECK_ needing to be set to 0. export MALLOC_CHECK_=0 diff --git a/lgsm/functions/fix_hw.sh b/lgsm/functions/fix_hw.sh index 8b5844f52..954a834a0 100644 --- a/lgsm/functions/fix_hw.sh +++ b/lgsm/functions/fix_hw.sh @@ -4,6 +4,8 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Hurtworld. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + if [ "${shortname}" == "hw" ]; then # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so. if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then diff --git a/lgsm/functions/fix_ins.sh b/lgsm/functions/fix_ins.sh index 8bd3f310b..f41dffbd4 100644 --- a/lgsm/functions/fix_ins.sh +++ b/lgsm/functions/fix_ins.sh @@ -4,8 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Insurgency. -local modulename="FIX" -local commandaction="Fix" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: ./srcds_linux: error while loading shared libraries: libtier0.so: cannot open shared object file: No such file or directory. @@ -13,7 +12,7 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/bin" # Fixes: issue #529 - gamemode not passed to debug or start. -if [ "${function_selfname}" == "command_debug.sh" ]; then +if [ "${commandname}" == "DEBUG" ]; then defaultmap="\"${defaultmap}\"" else defaultmap="\\\"${defaultmap}\\\"" diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh index f1b6d7b89..f0c29ee6f 100644 --- a/lgsm/functions/fix_kf.sh +++ b/lgsm/functions/fix_kf.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Killing Floor. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "Applying WebAdmin ROOst.css fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" diff --git a/lgsm/functions/fix_kf2.sh b/lgsm/functions/fix_kf2.sh index 2e54f1133..77edd77e8 100644 --- a/lgsm/functions/fix_kf2.sh +++ b/lgsm/functions/fix_kf2.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Killing Floor 2. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_parms(){ parms="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival\"" diff --git a/lgsm/functions/fix_mcb.sh b/lgsm/functions/fix_mcb.sh index c417a8a39..691647fb7 100644 --- a/lgsm/functions/fix_mcb.sh +++ b/lgsm/functions/fix_mcb.sh @@ -4,8 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves possible startup issue with Minecraft Bedrock. -local modulename="FIX" -local commandaction="Fix" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # official docs state that the server should be started with: LD_LIBRARY_PATH=. ./bedrock_server export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_mta.sh b/lgsm/functions/fix_mta.sh index 662a1df00..d57e04f3a 100644 --- a/lgsm/functions/fix_mta.sh +++ b/lgsm/functions/fix_mta.sh @@ -5,9 +5,7 @@ # Website: https://linuxgsm.com # Description: Installs the libmysqlclient for database functions on the server. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then fixname="libmysqlclient16" diff --git a/lgsm/functions/fix_nmrih.sh b/lgsm/functions/fix_nmrih.sh index 62ba20c21..2c9d8c743 100644 --- a/lgsm/functions/fix_nmrih.sh +++ b/lgsm/functions/fix_nmrih.sh @@ -4,8 +4,7 @@ # Description: Create symlinks for renamed No More Room In Hell serverfiles. # Solution from Steam Community post: https://steamcommunity.com/app/224260/discussions/2/1732089092441769414/ -local modulename="FIX" -local commandaction="Fix" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" diff --git a/lgsm/functions/fix_onset.sh b/lgsm/functions/fix_onset.sh index 59f7783ed..630245844 100644 --- a/lgsm/functions/fix_onset.sh +++ b/lgsm/functions/fix_onset.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Onset. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh index f07581ae2..9f08d56d7 100644 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/functions/fix_ro.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Red Orchestra. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "Applying WebAdmin ROOst.css fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh index 29f2299c6..9ceff7b29 100644 --- a/lgsm/functions/fix_rust.sh +++ b/lgsm/functions/fix_rust.sh @@ -4,8 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves startup issue with Rust. -local modulename="FIX" -local commandaction="Fix" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: [Raknet] Server Shutting Down (Shutting Down). export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${systemdir}/RustDedicated_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_rw.sh b/lgsm/functions/fix_rw.sh index 650d3b231..b02ec343e 100644 --- a/lgsm/functions/fix_rw.sh +++ b/lgsm/functions/fix_rw.sh @@ -4,7 +4,6 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Rising World. -local modulename="FIX" -local commandaction="Fix" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" diff --git a/lgsm/functions/fix_sdtd.sh b/lgsm/functions/fix_sdtd.sh index acb1d9891..91c94897a 100644 --- a/lgsm/functions/fix_sdtd.sh +++ b/lgsm/functions/fix_sdtd.sh @@ -4,7 +4,6 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with 7 Days to Die. -local modulename="FIX" -local commandaction="Fix" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_sfc.sh b/lgsm/functions/fix_sfc.sh index f74984753..874d6eca7 100644 --- a/lgsm/functions/fix_sfc.sh +++ b/lgsm/functions/fix_sfc.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Source Forts Classic. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -f "${serverfiles}/bin/datacache.so" ]; then ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so" diff --git a/lgsm/functions/fix_sof2.sh b/lgsm/functions/fix_sof2.sh index cdffa6c7f..51224c8e0 100644 --- a/lgsm/functions/fix_sof2.sh +++ b/lgsm/functions/fix_sof2.sh @@ -4,8 +4,6 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Soldier of Fortune 2. -local modulename="FIX" -local commandaction="Fix" - +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: error while loading shared libraries: libcxa.so.1 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_ss3.sh b/lgsm/functions/fix_ss3.sh index 1a5b22d7f..6bea53861 100644 --- a/lgsm/functions/fix_ss3.sh +++ b/lgsm/functions/fix_ss3.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Serious Sam 3. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: https://steamcommunity.com/app/41070/discussions/0/353916981477716386/ if [ ! -f "${serverfiles}/Bin/steamclient.so" ]||[ "$(diff "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so" 2>/dev/null)" ]; then diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index aba06461c..be5197b9d 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues related to SteamCMD. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Helps fix: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so. if [ ! -f "${HOME}/.steam/sdk64/steamclient.so" ]; then diff --git a/lgsm/functions/fix_terraria.sh b/lgsm/functions/fix_terraria.sh index bce7d44f8..712416bd8 100644 --- a/lgsm/functions/fix_terraria.sh +++ b/lgsm/functions/fix_terraria.sh @@ -4,8 +4,6 @@ # Website: https://linuxgsm.com # Description: Resolves an issue with Terraria. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export TERM=xterm diff --git a/lgsm/functions/fix_tf2.sh b/lgsm/functions/fix_tf2.sh index 72c5b53ab..59b841226 100644 --- a/lgsm/functions/fix_tf2.sh +++ b/lgsm/functions/fix_tf2.sh @@ -4,9 +4,7 @@ # Website: https://github.com/vectorsigma # Description: Resolves various issues with Team Fortress 2. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: Team Fortress 2 Segmentation fault for Red-Hat Distros #2062. if [ -f "/etc/redhat-release" ]&&[ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then diff --git a/lgsm/functions/fix_ts3.sh b/lgsm/functions/fix_ts3.sh index 5b4c010c7..b019012f7 100644 --- a/lgsm/functions/fix_ts3.sh +++ b/lgsm/functions/fix_ts3.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Teamspeak 3. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: makes libmariadb2 available #1924. if [ ! -f "${serverfiles}/libmariadb.so.2" ]; then diff --git a/lgsm/functions/fix_tu.sh b/lgsm/functions/fix_tu.sh index 24bae047a..1f01fd7b3 100644 --- a/lgsm/functions/fix_tu.sh +++ b/lgsm/functions/fix_tu.sh @@ -4,6 +4,8 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Tower Unite. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + if [ "${shortname}" == "tu" ]; then # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so. if [ ! -f "${executabledir}/steamclient.so" ]; then diff --git a/lgsm/functions/fix_unt.sh b/lgsm/functions/fix_unt.sh index f55be43a9..60f3d2edf 100644 --- a/lgsm/functions/fix_unt.sh +++ b/lgsm/functions/fix_unt.sh @@ -4,8 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves startup issue with Unturned. -local modulename="FIX" -local commandaction="Fix" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # steamclient.so: cannot open shared object file: No such file or directory export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" diff --git a/lgsm/functions/fix_ut.sh b/lgsm/functions/fix_ut.sh index e3e004be4..f9c81348a 100644 --- a/lgsm/functions/fix_ut.sh +++ b/lgsm/functions/fix_ut.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Unreal Tournament. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" #Set Binary Executable echo -e "chmod +x ${executabledir}/${executable}" diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh index 8dfb33432..fa2d29bf5 100644 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Unreal Tournament 2004. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "applying WebAdmin ut2003.css fix." echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" diff --git a/lgsm/functions/fix_ut3.sh b/lgsm/functions/fix_ut3.sh index 4c099294f..e6c018d00 100644 --- a/lgsm/functions/fix_ut3.sh +++ b/lgsm/functions/fix_ut3.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Unreal Tournament 3. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_parms(){ parms="server VCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?bIsDedicated=true?bIsLanMatch=false?bUsesStats=false?bShouldAdvertise=false?PureServer=1?bAllowJoinInProgress=true?ConfigSubDir=${selfname} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" diff --git a/lgsm/functions/fix_wurm.sh b/lgsm/functions/fix_wurm.sh index 79babb65e..809651d55 100644 --- a/lgsm/functions/fix_wurm.sh +++ b/lgsm/functions/fix_wurm.sh @@ -4,8 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Wurm Unlimited. -local modulename="FIX" -local commandaction="Fix" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Copies steamclient.so to correct location. if [ ! -f "${serverfiles}/nativelibs" ]; then diff --git a/lgsm/functions/fix_zmr.sh b/lgsm/functions/fix_zmr.sh index dade0ee1d..1825fa327 100644 --- a/lgsm/functions/fix_zmr.sh +++ b/lgsm/functions/fix_zmr.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Resolves various issues with Zombie Master: Reborn. -local modulename="FIX" -local commandaction="Fix" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -f "${serverfiles}/bin/datacache.so" ]; then ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 75d248ba4..282559deb 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Gets specific details from config files. -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ## Examples of filtering to get info from config files. # sed 's/foo//g' - remove foo diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index de35150ac..0316e25a3 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -5,7 +5,7 @@ # Description: Variables providing useful info on the Operating System such as disk and performace info. # Used for command_details.sh, command_debug.sh and alert.sh. -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Game Server pid if [ "${status}" == "1" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 07bbaa7f7..6d46d1b22 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -4,6 +4,8 @@ # Website: https://linuxgsm.com # Description: Defines server info messages for details and alerts. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + # Standard Details # This applies to all engines @@ -1507,7 +1509,7 @@ fn_info_message_select_engine(){ # Separator is different for details fn_messages_separator(){ - if [ "${function_selfname}" == "command_details.sh" ]; then + if [ "${commandname}" == "details" ]; then printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = else echo -e "=================================" @@ -1516,7 +1518,7 @@ fn_messages_separator(){ # Removes the passwords form all but details fn_info_message_password_strip(){ - if [ "${function_selfname}" != "command_details.sh" ]; then + if [ "${commandname}" != "DETAILS" ]; then if [ "${serverpassword}" ]; then serverpassword="********" fi diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 870cffd2a..1a6a42bb8 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -4,7 +4,7 @@ # Website: https://linuxgsm.com # Description: If specific parms are not set then this will be displayed in details. -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ## Examples of filtering to get info from config files # sed 's/foo//g' - remove foo diff --git a/lgsm/functions/install_complete.sh b/lgsm/functions/install_complete.sh index 03beeddd5..62eec08a2 100644 --- a/lgsm/functions/install_complete.sh +++ b/lgsm/functions/install_complete.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Prints installation completion message and hints. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "=================================" diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 0322be9fb..13558e4da 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Creates default server configs. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Checks if server cfg dir exists, creates it if it doesn't. fn_check_cfgdir(){ diff --git a/lgsm/functions/install_dst_token.sh b/lgsm/functions/install_dst_token.sh index b1fec01c3..7eab2a153 100644 --- a/lgsm/functions/install_dst_token.sh +++ b/lgsm/functions/install_dst_token.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Configures Don't Starve Together cluster with given token. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Enter ${gamename} Cluster Token${default}" diff --git a/lgsm/functions/install_eula.sh b/lgsm/functions/install_eula.sh index d7893b16c..cd51954d0 100644 --- a/lgsm/functions/install_eula.sh +++ b/lgsm/functions/install_eula.sh @@ -4,6 +4,8 @@ # Website: https://linuxgsm.com # Description: Gets user to accept the EULA. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + if [ "${shortname}" == "ts3" ]; then eulaurl="https://www.teamspeak.com/en/privacy-and-terms" elif [ "${shortname}" == "mc" ]; then @@ -25,7 +27,7 @@ if [ -z "${autoinstall}" ]; then if ! fn_prompt_yn "Continue?" Y; then core_exit.sh fi -elif [ "${function_selfname}" == "command_start.sh" ]; then +elif [ "${commandname}" == "START" ]; then fn_print_info "By continuing you are indicating your agreement to the EULA." echo -e "" sleep 5 diff --git a/lgsm/functions/install_factorio_save.sh b/lgsm/functions/install_factorio_save.sh index 5abdc4069..71690a7a7 100644 --- a/lgsm/functions/install_factorio_save.sh +++ b/lgsm/functions/install_factorio_save.sh @@ -4,8 +4,7 @@ # Website: https://linuxgsm.com # Description: Creates the initial save file for Factorio -local modulename="INSTALL" -local commandaction="Install" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Creating initial Factorio savefile${default}" diff --git a/lgsm/functions/install_gslt.sh b/lgsm/functions/install_gslt.sh index ae10508b5..27d384936 100644 --- a/lgsm/functions/install_gslt.sh +++ b/lgsm/functions/install_gslt.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Configures GSLT. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Game Server Login Token${default}" diff --git a/lgsm/functions/install_header.sh b/lgsm/functions/install_header.sh index 8a63fb289..f67860dd4 100644 --- a/lgsm/functions/install_header.sh +++ b/lgsm/functions/install_header.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Prints installation header. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" clear fn_print_ascii_logo diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 98057df6f..be54eb42d 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Creates log directories. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${checklogs}" != "1" ]; then echo -e "" diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh index 01ceeeb80..194d9f546 100644 --- a/lgsm/functions/install_mta_resources.sh +++ b/lgsm/functions/install_mta_resources.sh @@ -5,9 +5,7 @@ # Website: https://linuxgsm.com # Description: Installs the libmysqlclient for database functions on the server and optionally installs default resources required to run the server -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_information_nl "${gamename} will not function without resources!" echo -e " * install default resources using ./${selfname} install-default-resources" diff --git a/lgsm/functions/install_retry.sh b/lgsm/functions/install_retry.sh index 3a65049ce..2d6e3df7b 100644 --- a/lgsm/functions/install_retry.sh +++ b/lgsm/functions/install_retry.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Asks for installation retry after failure. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if fn_prompt_yn "Retry install?" Y; then command_install.sh; core_exit.sh diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/functions/install_server_dir.sh index 71f2aa4c4..cfd586dc4 100644 --- a/lgsm/functions/install_server_dir.sh +++ b/lgsm/functions/install_server_dir.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Creates the server directory. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Server Directory${default}" diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 8cb203bac..a3ddd435a 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Installs server files. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_server_files(){ if [ "${shortname}" == "ahl" ]; then diff --git a/lgsm/functions/install_squad_license.sh b/lgsm/functions/install_squad_license.sh index accb3021e..b17b1ab7e 100644 --- a/lgsm/functions/install_squad_license.sh +++ b/lgsm/functions/install_squad_license.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Configures the Squad server's license. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Squad Server License${default}" diff --git a/lgsm/functions/install_stats.sh b/lgsm/functions/install_stats.sh index 2d44706e8..355b7fa67 100644 --- a/lgsm/functions/install_stats.sh +++ b/lgsm/functions/install_stats.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Enabled LinuxGSM Stats. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}LinuxGSM Stats${default}" diff --git a/lgsm/functions/install_steamcmd.sh b/lgsm/functions/install_steamcmd.sh index 9a2415079..40acf435b 100644 --- a/lgsm/functions/install_steamcmd.sh +++ b/lgsm/functions/install_steamcmd.sh @@ -4,8 +4,7 @@ # Website: https://linuxgsm.com # Description: Downloads SteamCMD on install. -local modulename="INSTALL" -local commandaction="Install" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Installing SteamCMD${default}" diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh index 7cc448d7b..a77a0ea38 100644 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/functions/install_ts3db.sh @@ -5,9 +5,7 @@ # Website: https://linuxgsm.com # Description: Installs the database server MariaDB for TeamSpeak 3. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_ts3db_mariadb(){ if [ ! -f "${serverfiles}/libts3db_mariadb.so" ]; then diff --git a/lgsm/functions/install_ut2k4_key.sh b/lgsm/functions/install_ut2k4_key.sh index cb02829d2..144ac278e 100644 --- a/lgsm/functions/install_ut2k4_key.sh +++ b/lgsm/functions/install_ut2k4_key.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Activates ut2k4 server with given key. -local modulename="INSTALL" -local commandaction="Install" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Enter ${gamename} CD Key${default}" diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index ff088653b..7fc030210 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -5,9 +5,7 @@ # Website: https://linuxgsm.com # Description: Core functions for mods list/install/update/remove -local modulename="MODS" -local commandaction="Mods" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Files and Directories. modsdir="${lgsmdir}/mods" diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index ed354d153..e47f3f909 100644 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -8,9 +8,7 @@ # Usage: Then add this array to the mods_global_array. # Usage: If needed, you can scrape the download URL first. -local modulename="MODS" -local commandaction="List Mods" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Get a proper URL for mods that don't provide a good one (optional) fn_script_log_info "Retrieving latest mods URLs" diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index bfe38b937..fca71c57c 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -5,6 +5,8 @@ # Description: Querys a gameserver using node-gamedig. # https://github.com/sonicsnes/node-gamedig +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + # Check if gamedig and jq are installed. if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 1fcfe9bf9..e45a75c8c 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Factorio servers. -local modulename="UPDATE" -local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_factorio_dl(){ fn_fetch_file "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index a8f97dd17..d74586143 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Minecraft servers. -local modulename="UPDATE" -local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_minecraft_dl(){ if [ "${branch}" == "release" ]; then diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index d9d875c45..3336d13ff 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Minecraft Bedrock servers. -local modulename="UPDATE" -local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_minecraft_dl(){ latestmcbuildurl=$(curl -s "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip') diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index db3080b17..57c452d8a 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Multi Theft Auto servers. -local modulename="UPDATE" -local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_mta_dl(){ fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 88a7102c8..38fc78aa3 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Mumble servers. -local modulename="UPDATE" -local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_mumble_dl(){ fn_fetch_file "https://github.com/mumble-voip/mumble/releases/download/${remotebuild}/murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index ed809451a..1ab93ad53 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Handles updating using SteamCMD. -local modulename="UPDATE" -local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_steamcmd_dl(){ info_config.sh @@ -224,7 +222,7 @@ fn_stop_warning(){ # The location where the builds are checked and downloaded. remotelocation="SteamCMD" -check.sh +check_steamcmd.sh if [ "${forceupdate}" == "1" ]; then # forceupdate bypasses update checks. diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index 593183f6f..e50590087 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -4,9 +4,7 @@ # Website: https://linuxgsm.com # Description: Handles updating of Teamspeak 3 servers. -local modulename="UPDATE" -local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_ts3_dl(){ if [ "${ts3arch}" == "amd64" ]; then diff --git a/linuxgsm.sh b/linuxgsm.sh index 19ebb01af..ca9d38852 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -23,6 +23,7 @@ fi version="v20.2.0" shortname="core" gameservername="core" +commandname="CORE" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") lgsmdir="${rootdir}/lgsm" From d96507ac640929d47e5f191d4567f23ee90e1731 Mon Sep 17 00:00:00 2001 From: Kenneth Lorthioir Date: Sat, 2 May 2020 19:04:10 -0400 Subject: [PATCH 14/96] feat(pstbsserver): update Post Scriptum _default.cfg (#2848) Game server uses regular spacing not "?" between commands. Changed reservedslots to 0 as this is a saner default. Change MaxPlayers to FIXEDMAXPLAYERS. Added RCON port. --- lgsm/config-default/config-lgsm/pstbsserver/_default.cfg | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 9c60c53bc..1a80e7a02 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -12,14 +12,15 @@ ip="0.0.0.0" port="10027" queryport="10037" -randommap="ALWAYS" +rconport="21114" +randommap="NONE" #servername="LinuxGSM Server" maxplayers="40" -reservedslots="2" +reservedslots="0" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="MULTIHOME=${ip}?RANDOM=${randommap}?Port=${port}?QueryPort=${queryport}?MaxPlayers=${maxplayers}?NumReservedSlots=${reservedslots}" +parms="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport} RCONPORT=${rconport} FIXEDMAXPLAYERS=${maxplayers} NumReservedSlots=${reservedslots}" } #### LinuxGSM Settings #### From 30bb11bb94fce8c5ded74c93d8275f50c9637287 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 4 May 2020 19:33:58 +0100 Subject: [PATCH 15/96] feat(stats): provide more accurate server numbers (#2864) --- lgsm/data/name-left.csv | 108 ++++++++++++++++ lgsm/data/name-right.csv | 237 +++++++++++++++++++++++++++++++++++ lgsm/functions/info_stats.sh | 137 +++++++++++++++----- 3 files changed, 451 insertions(+), 31 deletions(-) create mode 100644 lgsm/data/name-left.csv create mode 100644 lgsm/data/name-right.csv diff --git a/lgsm/data/name-left.csv b/lgsm/data/name-left.csv new file mode 100644 index 000000000..9a47b4baf --- /dev/null +++ b/lgsm/data/name-left.csv @@ -0,0 +1,108 @@ +admiring +adoring +affectionate +agitated +amazing +angry +awesome +beautiful +blissful +bold +boring +brave +busy +charming +clever +cool +compassionate +competent +condescending +confident +cranky +crazy +dazzling +determined +distracted +dreamy +eager +ecstatic +elastic +elated +elegant +eloquent +epic +exciting +fervent +festive +flamboyant +focused +friendly +frosty +funny +gallant +gifted +goofy +gracious +great +happy +hardcore +heuristic +hopeful +hungry +infallible +inspiring +interesting +intelligent +jolly +jovial +keen +kind +laughing +loving +lucid +magical +mystifying +modest +musing +naughty +nervous +nice +nifty +nostalgic +objective +optimistic +peaceful +pedantic +pensive +practical +priceless +quirky +quizzical +recursing +relaxed +reverent +romantic +sad +serene +sharp +silly +sleepy +stoic +strange +stupefied +suspicious +sweet +tender +thirsty +trusting +unruffled +upbeat +vibrant +vigilant +vigorous +wizardly +wonderful +xenodochial +youthful +zealous +zen \ No newline at end of file diff --git a/lgsm/data/name-right.csv b/lgsm/data/name-right.csv new file mode 100644 index 000000000..8e04d85b4 --- /dev/null +++ b/lgsm/data/name-right.csv @@ -0,0 +1,237 @@ +albattani +allen +almeida +antonelli +agnesi +archimedes +ardinghelli +aryabhata +austin +babbage +banach +banzai +bardeen +bartik +bassi +beaver +bell +benz +bhabha +bhaskara +black +blackburn +blackwell +bohr +booth +borg +bose +bouman +boyd +brahmagupta +brattain +brown +buck +burnell +cannon +carson +cartwright +carver +cerf +chandrasekhar +chaplygin +chatelet +chatterjee +chebyshev +cohen +chaum +clarke +colden +cori +cray +curran +curie +darwin +davinci +dewdney +dhawan +diffie +dijkstra +dirac +driscoll +dubinsky +easley +edison +einstein +elbakyan +elgamal +elion +ellis +engelbart +euclid +euler +faraday +feistel +fermat +fermi +feynman +franklin +gagarin +galileo +galois +ganguly +gates +gauss +germain +goldberg +goldstine +goldwasser +golick +goodall +gould +greider +grothendieck +haibt +hamilton +haslett +hawking +hellman +heisenberg +hermann +herschel +hertz +heyrovsky +hodgkin +hofstadter +hoover +hopper +hugle +hypatia +ishizaka +jackson +jang +jemison +jennings +jepsen +johnson +joliot +jones +kalam +kapitsa +kare +keldysh +keller +kepler +khayyam +khorana +kilby +kirch +knuth +kowalevski +lalande +lamarr +lamport +leakey +leavitt +lederberg +lehmann +lewin +lichterman +liskov +lovelace +lumiere +mahavira +margulis +matsumoto +maxwell +mayer +mccarthy +mcclintock +mclaren +mclean +mcnulty +mendel +mendeleev +meitner +meninsky +merkle +mestorf +mirzakhani +moore +morse +murdock +moser +napier +nash +neumann +newton +nightingale +nobel +noether +northcutt +noyce +panini +pare +pascal +pasteur +payne +perlman +pike +poincare +poitras +proskuriakova +ptolemy +raman +ramanujan +ride +montalcini +ritchie +rhodes +robinson +roentgen +rosalind +rubin +saha +sammet +sanderson +satoshi +shamir +shannon +shaw +shirley +shockley +shtern +sinoussi +snyder +solomon +spence +stonebraker +sutherland +swanson +swartz +swirles +taussig +tereshkova +tesla +tharp +thompson +torvalds +tu +turing +varahamihira +vaughan +visvesvaraya +volhard +villani +wescoff +wilbur +wiles +williams +williamson +wilson +wing +wozniak +wright +wu +yalow +yonath +zhukovsky \ No newline at end of file diff --git a/lgsm/functions/info_stats.sh b/lgsm/functions/info_stats.sh index 078639fe6..9bdee07fd 100644 --- a/lgsm/functions/info_stats.sh +++ b/lgsm/functions/info_stats.sh @@ -2,73 +2,148 @@ # LinuxGSM info_stats.sh function # Author: Daniel Gibbs # Website: https://linuxgsm.com -# Description: Optional Stats to send to LinuxGSM Developer -# Uses Google analytics +# Description: Collect optional Stats sent to LinuxGSM project. +# Uses Google analytics. + +local modulegroup="INFO" +local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_distro.sh -# generate uuid -if [ ! -f "${datadir}/uuid.txt" ]; then - mkdir -p "${datadir}" - touch "${datadir}/uuid.txt" - if [ "$(command -v uuidgen 2>/dev/null)" ]; then - uuidgen > "${datadir}/uuid.txt" + +# remove uuid that was used in v20.2.0 and below +if [ -f "${datadir}/uuid.txt" ]; then + rm "${datadir:?}/uuid.txt" +fi + +# generate uuid's +# this consists of a standard uuid and a docker style name +# to allow human readable uuid's. +# e.g angry_proskuriakova_38a9ef76-4ae3-46a6-a895-7af474831eba + +if [ ! -f "${datadir}/uuid-${selfname}.txt" ]||[ ! -f "${datadir}/uuid-install.txt" ]; then + # download dictionary words + if [ ! -f "${datadir}/name-left.csv" ]; then + fn_fetch_file_github "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fi + if [ ! -f "${datadir}/name-right.csv" ]; then + fn_fetch_file_github "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fi + + # generate instance uuid + if [ -n "$(command -v uuidgen 2>/dev/null)" ]; then + uuid="$(uuidgen)" else - cat /proc/sys/kernel/random/uuid > "${datadir}/uuid.txt" + uuid="$(cat /proc/sys/kernel/random/uuid)" + fi + + nameleft="$(shuf -n 1 "${datadir}/name-left.csv")" + nameright="$(shuf -n 1 "${datadir}/name-right.csv")" + echo "instance_${nameleft}_${nameright}_${uuid}" > "${datadir}/uuid-${selfname}.txt" + # generate install uuid if missing + if [ ! -f "${datadir}/uuid-install.txt" ];then + echo "${nameleft}_${nameright}_${uuid}" > "${datadir}/uuid-install.txt" fi fi -uuid=$(cat "${datadir}/uuid.txt") +uuidinstance=$(cat "${datadir}/uuid-${selfname}.txt") +uuidinstall=$(cat "${datadir}/uuid-install.txt") +# machine-id is a unique id set on OS install +uuidhardware=$(cat "/etc/machine-id") + # results are rounded up to reduce number of different results in analytics. # nearest 100Mhz. -cpuusedmhzroundup=$(((cpuusedmhz + 99) / 100 * 100)) +cpuusedmhzroundup="$(((cpuusedmhz + 99) / 100 * 100))" # nearest 100MB -memusedroundup=$(((memused + 99) / 100 * 100)) +memusedroundup="$(((memused + 99) / 100 * 100))" + +# Spliting the metrics in to 3 propertys allows more accurate metrics on numbers of invidual instances, installs and hardware. +# Instance Property - UA-165287622-1 +# Install Property - UA-165287622-2 +# Hardware Property - UA-165287622-3 ## Distro. -curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + ## Game Server Name. -curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + ## LinuxGSM Version. -curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 ## CPU usage of a game server. -if [ "${cpuusedmhzroundup}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +if [ -n "${cpuusedmhzroundup}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 fi ## Ram usage of a game server. -if [ "${memusedroundup}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +if [ -n "${memusedroundup}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 fi ## Disk usage of a game server. -if [ "${serverfilesdu}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +if [ -n "${serverfilesdu}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 fi ## CPU Model. -if [ "${cpumodel}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +if [ -n "${cpumodel}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + fi ## CPU Frequency. -if [ "${cpufreqency}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +if [ -n "${cpufreqency}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 fi ## Server RAM. -if [ "${physmemtotal}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +if [ -n "${physmemtotal}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 fi ## Server Disk. -if [ "${totalspace}" ]; then - curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 +if [ -n "${totalspace}" ]; then + curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 + curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1 fi ## Summary Stats -curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1 +curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1 fn_script_log_info "Send LinuxGSM stats" -fn_script_log_info "* UUID: ${uuid}" +fn_script_log_info "* uuid-${selfname}: ${uuidinstance}" +fn_script_log_info "* uuid-install: ${uuidinstall}" +fn_script_log_info "* uuid-hardware: ${uuidhardware}" fn_script_log_info "* Game Name: ${gamename}" fn_script_log_info "* Distro Name: ${distroname}" fn_script_log_info "* Game Server CPU Used: ${cpuusedmhzroundup}MHz" From 4ec92fc43f58a37e842b5512671643e98608422a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 May 2020 11:21:35 +0100 Subject: [PATCH 16/96] release v20.2.1 --- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 19ebb01af..5d26a8672 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.2.0" +version="v20.2.1" shortname="core" gameservername="core" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 235d1bd93..7881ad8d6 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.2.0" +version="v20.2.1" shortname="fctr" gameservername="fctrserver" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 65e8acaef..dd39ce047 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.2.0" +version="v20.2.1" shortname="jc2" gameservername="jc2server" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 1a3f86802..a8f16a22a 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.2.0" +version="v20.2.1" shortname="mc" gameservername="mcserver" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 01c195ce3..af50e3805 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.2.0" +version="v20.2.1" shortname="ts3" gameservername="ts3server" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") From 458fec5782b380fbf1c2f2e643dd426e3e606b32 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 May 2020 11:35:31 +0100 Subject: [PATCH 17/96] fix(update): resolve issue with steamcmd update not getting latest build --- lgsm/functions/update_steamcmd.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index ed809451a..1e9679f9d 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -47,11 +47,6 @@ fn_update_steamcmd_localbuild(){ # Uses appmanifest to find local build. localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) - # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. - if [ -f "${HOME}/.steam/appcache/appinfo.vdf" ]; then - rm -f "${HOME}/.steam/appcache/appinfo.vdf" - fi - # Set branch for updateinfo. IFS=' ' read -ra branchsplits <<< "${branch}" if [ "${#branchsplits[@]}" -gt 1 ]; then @@ -76,6 +71,12 @@ fn_update_steamcmd_remotebuild(){ if [ -d "${steamcmddir}" ]; then cd "${steamcmddir}" || exit fi + + # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. + if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then + find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; + fi + remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branchname}/d" | grep -m 1 buildid | tr -cd '[:digit:]') if [ "${installer}" != "1" ]; then fn_print_dots "Checking remote build: ${remotelocation}" From 34b2c83882161f0aa3ce39fe7879a87afbc4d543 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 7 May 2020 14:14:12 +0100 Subject: [PATCH 18/96] tidied up bots and templates --- .github/FUNDING.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- .github/ISSUE_TEMPLATE/feature_request.md | 6 +++--- .github/ISSUE_TEMPLATE/new-server-request.md | 2 +- .github/pr_labels.yml | 5 ----- .github/pull_request_template.md | 6 +++--- .github/request-info.yml | 17 ---------------- .github/support.yml | 15 -------------- .github/welcome.yml | 21 -------------------- 9 files changed, 10 insertions(+), 68 deletions(-) delete mode 100644 .github/pr_labels.yml delete mode 100644 .github/request-info.yml delete mode 100644 .github/support.yml delete mode 100644 .github/welcome.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index bb77d9f85..ee85cb782 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -3,7 +3,7 @@ github: dgibbs64 # 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: dgibbs # Replace with a single Ko-fi 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 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index db7ccf4f7..d3c1adfbb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Found a bug? Raise a report +about: Found a bug? Raise a report. --- Issues raised here are **ONLY** for: @@ -27,7 +27,7 @@ As a [user description], I want [desired action] so that [desired outcome]. * **Distro:** [Ubuntu 18.04] * **Game:** [Garry's Mod] * **Command:** [Monitor] -* **LinuxGSM version:** [v12.34.56] +* **LinuxGSM version:** [v20.1.3] ## Further Information diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 68bdf0ad6..dc51fe40e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,6 +1,6 @@ --- name: Feature request -about: Suggest an idea for this project +about: Suggest an idea for LinuxGSM. --- @@ -25,10 +25,10 @@ As a [user description], I want [desired action] so that [desired outcome]. ## Basic info -* **Distro:** [Ubuntu 18.04] +* **Distro:** [Ubuntu 20.04] * **Game:** [Garry's Mod] * **Command:** [Monitor] -* **LinuxGSM version:** [v12.34.56] +* **LinuxGSM version:** [v20.1.3] ## Further Information diff --git a/.github/ISSUE_TEMPLATE/new-server-request.md b/.github/ISSUE_TEMPLATE/new-server-request.md index 8101f74f0..ada8638cc 100644 --- a/.github/ISSUE_TEMPLATE/new-server-request.md +++ b/.github/ISSUE_TEMPLATE/new-server-request.md @@ -1,6 +1,6 @@ --- name: New server request -about: Suggest a new game server to be added +about: Suggest a new game server to be added. --- diff --git a/.github/pr_labels.yml b/.github/pr_labels.yml deleted file mode 100644 index db1f63f6b..000000000 --- a/.github/pr_labels.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: '1' -invalidStatus: "pending" -labelRule: - startsWith: - - "type:" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 5aa59ce42..af1c7faba 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,7 +6,7 @@ Fixes #[issue] ## Type of change -* [ ] Bug fix (change which fixes an issue). +* [ ] Bug fix (a change which fixes an issue). * [ ] New feature (change which adds functionality). * [ ] New Server (new server added). * [ ] Refactor (restructures existing code). @@ -20,9 +20,9 @@ PR will not be merged until all steps are complete. * [ ] This pull request uses the `develop` branch as its base. * [ ] This pull request Subject follows the Conventional Commits standard. * [ ] This code follows the style guidelines of this project. -* [ ] I have performed a self-review of my own code. +* [ ] I have performed a self-review of my code. * [ ] I have checked that this code is commented where required. -* [ ] I have provided a detailed enough description of this PR. +* [ ] I have provided a detailed with enough description of this PR. * [ ] I have checked If documentation needs updating. ## Documentation diff --git a/.github/request-info.yml b/.github/request-info.yml deleted file mode 100644 index ed407c3b5..000000000 --- a/.github/request-info.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Configuration for request-info - https://github.com/behaviorbot/request-info - -# *Required* Comment to reply with -requestInfoReplyComment: > - ![More Data required](https://i.imgur.com/yS9cecv.png) - More data is required to assist with this issue - or issue template was not used correctly. - https://linuxgsm.com/support/#guide - -# *OPTIONAL* default titles to check against for lack of descriptiveness -# MUST BE ALL LOWERCASE -#requestInfoDefaultTitles: -# - update readme.md -# - updates - -# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given -requestInfoLabelToAdd: "needs more info" diff --git a/.github/support.yml b/.github/support.yml deleted file mode 100644 index 2f45e92ec..000000000 --- a/.github/support.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Configuration for support-requests - https://github.com/dessant/support-requests - -# Label used to mark issues as support requests -supportLabel: "Outcome: wrong forum" -# Comment to post on issues marked as support requests. Add a link -# to a support page, or set to `false` to disable -supportComment: > - We use the issue tracker exclusively for bug reports and feature requests. - However, this issue appears to be a support request. Please use our - support channels to get help with the project. - https://linuxgsm.com/support -# Whether to close issues marked as support requests -close: true -# Whether to lock issues marked as support requests -lock: false diff --git a/.github/welcome.yml b/.github/welcome.yml deleted file mode 100644 index 7d0cb281b..000000000 --- a/.github/welcome.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Configuration for welcome - https://github.com/behaviorbot/welcome - -# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome - -# Comment to be posted to on first time issues -newIssueWelcomeComment: > - Thank you for opening your first issue. Be sure to follow the issue template! and guide for posting. https://linuxgsm.com/support/#guide - -# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome - -# Comment to be posted to on PRs from first time contributors in your repository -newPRWelcomeComment: > - Thank you for opening this pull request! Please check out our contributing guidelines. - -# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge - -# Comment to be posted to on pull requests merged by a first time user -firstPRMergeComment: > - Congratulations on merging your first pull request! Thank you for supporting LinuxGSM! - -# It is recommend to include as many gifs and emojis as possible From 894ead178e6fbc6c993140bb482435f4f6b7ced4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 7 May 2020 14:22:19 +0100 Subject: [PATCH 19/96] add bitbucket sync and tidied up bots --- .github/FUNDING.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- .github/ISSUE_TEMPLATE/feature_request.md | 6 +++--- .github/ISSUE_TEMPLATE/new-server-request.md | 2 +- .github/pull_request_template.md | 6 +++--- .github/workflows/git-sync.yml | 22 ++++++++++++++++++++ 6 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/git-sync.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index bb77d9f85..ee85cb782 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -3,7 +3,7 @@ github: dgibbs64 # 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: dgibbs # Replace with a single Ko-fi 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 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index db7ccf4f7..d3c1adfbb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Found a bug? Raise a report +about: Found a bug? Raise a report. --- Issues raised here are **ONLY** for: @@ -27,7 +27,7 @@ As a [user description], I want [desired action] so that [desired outcome]. * **Distro:** [Ubuntu 18.04] * **Game:** [Garry's Mod] * **Command:** [Monitor] -* **LinuxGSM version:** [v12.34.56] +* **LinuxGSM version:** [v20.1.3] ## Further Information diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 68bdf0ad6..dc51fe40e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,6 +1,6 @@ --- name: Feature request -about: Suggest an idea for this project +about: Suggest an idea for LinuxGSM. --- @@ -25,10 +25,10 @@ As a [user description], I want [desired action] so that [desired outcome]. ## Basic info -* **Distro:** [Ubuntu 18.04] +* **Distro:** [Ubuntu 20.04] * **Game:** [Garry's Mod] * **Command:** [Monitor] -* **LinuxGSM version:** [v12.34.56] +* **LinuxGSM version:** [v20.1.3] ## Further Information diff --git a/.github/ISSUE_TEMPLATE/new-server-request.md b/.github/ISSUE_TEMPLATE/new-server-request.md index 8101f74f0..ada8638cc 100644 --- a/.github/ISSUE_TEMPLATE/new-server-request.md +++ b/.github/ISSUE_TEMPLATE/new-server-request.md @@ -1,6 +1,6 @@ --- name: New server request -about: Suggest a new game server to be added +about: Suggest a new game server to be added. --- diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 5aa59ce42..af1c7faba 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,7 +6,7 @@ Fixes #[issue] ## Type of change -* [ ] Bug fix (change which fixes an issue). +* [ ] Bug fix (a change which fixes an issue). * [ ] New feature (change which adds functionality). * [ ] New Server (new server added). * [ ] Refactor (restructures existing code). @@ -20,9 +20,9 @@ PR will not be merged until all steps are complete. * [ ] This pull request uses the `develop` branch as its base. * [ ] This pull request Subject follows the Conventional Commits standard. * [ ] This code follows the style guidelines of this project. -* [ ] I have performed a self-review of my own code. +* [ ] I have performed a self-review of my code. * [ ] I have checked that this code is commented where required. -* [ ] I have provided a detailed enough description of this PR. +* [ ] I have provided a detailed with enough description of this PR. * [ ] I have checked If documentation needs updating. ## Documentation diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml new file mode 100644 index 000000000..f4936486d --- /dev/null +++ b/.github/workflows/git-sync.yml @@ -0,0 +1,22 @@ +name: Github to Bitbucket sync +# This action will sync the github repo with a backup bitbucket repo. +# This will allow LinuxGSM to use Bitbucket as and alternative download if github fails. +on: push +jobs: + repo-sync: + runs-on: ubuntu-latest + steps: + - name: ssh + uses: webfactory/ssh-agent@v0.2.0 + with: + ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} + ssh_private_key: ${{ secrets.BITBUCKET_SECRET }} + + - name: repo-sync + uses: wei/git-sync@v2 + with: + source_repo: "https://github.com/GameServerManagers/LinuxGSM" + source_branch: "refs/heads/*" + destination_repo: "git@bitbucket.org:dgibbs64/linuxgsm.git" + destination_branch: "refs/heads/*" + ssh_private_key: ${{ secrets.BITBUCKET_SECRET }} From b79927768e6cfd49d7ebd6100602428cd7b624e9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 May 2020 22:26:20 +0100 Subject: [PATCH 20/96] Update git-sync.yml --- .github/workflows/git-sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index f4936486d..a6cbe003a 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -17,6 +17,6 @@ jobs: with: source_repo: "https://github.com/GameServerManagers/LinuxGSM" source_branch: "refs/heads/*" - destination_repo: "git@bitbucket.org:dgibbs64/linuxgsm.git" + destination_repo: "git@bitbucket.org:GameServerManagers/linuxgsm.git" destination_branch: "refs/heads/*" ssh_private_key: ${{ secrets.BITBUCKET_SECRET }} From 539b806f6d92c5f74c97b26218aebf583ccdd909 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 May 2020 22:35:21 +0100 Subject: [PATCH 21/96] Update git-sync.yml --- .github/workflows/git-sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index a6cbe003a..b3d5ea171 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -1,4 +1,4 @@ -name: Github to Bitbucket sync +name: Backup Repo # This action will sync the github repo with a backup bitbucket repo. # This will allow LinuxGSM to use Bitbucket as and alternative download if github fails. on: push From 9233f4888f742acd697f6ec6a55916a76169d65e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 May 2020 22:51:57 +0100 Subject: [PATCH 22/96] Update README.md --- README.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 6fecaea1a..7491edbde 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ LinuxGSM -[![LinuxGSM](https://img.shields.io/badge/-LinuxGSM-2b2b2b.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACsAAABACAYAAACDbo5ZAAAGD0lEQVR4AcWYa2wUVRvHz75c2vJ2disXoUBEVIioRAx%2BMIFA1IRwUS6KCCiIKBrvhEYiiGm5iBgk8QOGEgUUDYTttmVZWFr2UmwURS6iYAoCtmisElSsdHdbkT7%2BTzoNy%2BGc2dm54C%2F5Rdkz85x%2FZ86ZOXOYXYhIg3Phx%2FA4PAcv6f%2Btg5vhHJjP3EcZsgsshufJHH%2FAJbDztQ7aG35J1vgCXn%2BtgvrgEbLHYei9FmE3kDOUuh10OGwjZ7gEh7kZ9gNyllK3gnrg7%2BQs56DHjbCDyB0GuRF2ArnDeDfCziF3mO1G2FfJHRa4EXYpuUOxG2GXkzuUuBH2TXKH5W6ELSV3eM%2BNsOUk5yQcAY8p2uvgSPitor3MjbB1UOQXOFBvHwpbhPYWOExvL4SNUOQ7p4P2JTlzhOPmCu0vCu1PQpE2WOhk2MdJjk9y7HNwP1wEPUJbAcmZ6WTYrYolnifbxZBiibnFySHQCkUaLdY7C0V4%2FT5OhF1JcuIW6%2B0lOcvsBi2Ezao3j8Ov7Quwj52w60jNKIs1R5GatVaDDoEXSU4D7GSxbidYT3IuwjusFK0mNUVMwaZNNbl%2B%2F87hoVCom0HthaQmnG3QB0lNPcxlCvz%2B0GtlZTuorCxYYlA%2FDzbY%2FnrAgV3hCVLzCDMgEAi9wMMi9IIM%2FUwnNXWwi5mwRaSmmmXA798xq%2F3Khp420VeE1LyS6eQeBhttSXgzywCCToIUCOyYZvKLOWWwkdfd6ORVpGYJM0F5efDe9mEQHGty2BWTmhVGO4PNBmOoKzMBxmo%2FhD25dWvljSbD5hjMkb9gT9lJq63Mzi1bKkbjloc7xBWtwiRrDASCVRi%2FRxA8if%2BvrawMTzYI%2FACpeUv2KFFtDcUyTKilCHcis8G1Ga7wHpLzG8wVFs1K7jaeUKHZfIxmkj9%2FM4S9x9RGiMEudo0QbCVu9Xqn5PWEwLUk5%2FP0iaXac53I0kAH9Sau4m54lo%2FdTMfyekLYKQZ7ub34AbMMlmw5irC2VYTN0fuVMYMf8JHxJ7L7YYXAlSRnI2%2F8RtH4siTsDMz%2BZ5yS15OEXUxyDjGD1%2BvEq8MG16CDzY6JepKwT6geYbzxb0XjGMl7vwGSgzZIwo4nOa1M8Yr9Afb%2Fj8L21%2FsXaeaNZ2A6KTiEASph%2F0vF80cn4tokqu79fzfCUk2vfF4%2FFdFGEjGPHvg2yWrsDG%2F4%2BqpZB8jPOiXjWk0y5iXdM3XhKUvxBTA9UvHuvNPh%2Bzb%2BWj10z6nwuHWBbQFMvNCjKnn7qd1jS%2Fnx9VX3b6jC%2BbwOr5eMe3%2B83IcW4%2F3qgT%2BUTbA9srGaiHsn8AKiF6Ld%2FxF%2FOx6eeAJXabvK78MTTornNMd6XJTVR7%2Fj9bBjhFxV%2FMc1kJOAy2AeA%2FgrV4mFVDZFCqm8rEJ6qysCAWqK9iaztRJRbWXa4moFTELOav7jY%2FqAvoXp0Gc9NX7bIZl17%2FZl0rC1wRLeno0NvP%2B0CTcYNnS8wW6CtzNANaxzKqo9hRNOQ8rGo7tmSsMe2zWdt2frqVRcm5s2fofCgawDNHRNxnyfqgsYez4y4ADCjRM9H73hsNWafILTQdaFiSTj%2BQ%2FxA6yH7d%2BCmR8XbYr0a7VTF2N4siSsb5qdos3R6%2FjGxpULFfw7EfORnbrI9TAToX0sD40%2F2ylcGdh2Rdhg%2BSf2gka9jRTqK9%2BGwgHz7RTfVbHxirDhivdthYUvMRX8aYAD9lstvi%2B0aDL2DUZ0eCBUNNVG0IP65FLTWqPdiqdC0koHTVXe7iyNRG23QotBEy1RbTAzQyrmnYUT2rLsoA13JpcB4eVC2daBM1g2JGLekmwf5On7EJfngfZTNnVSce8bFjaTmQdvs%2FXmO%2FJVpoXdx3RSUe9O00Fj3nUdy0RLgRHiHXOPGW1h2uKZ07c9rG%2Bxyefp23pQeyBIEQoavYlakrG8fnrY5yHn2fbxXzAgw7m8bT5zkkSk4C7cpmOK21esB%2FXAQ5DzFfTo43%2BF%2FDzf0eZ4wZ3MDSjMcvD6nIeOahGgia%2FyU3HforTPkWkwnakdn0cI9jqfbPjD%2FuQLJr6644snlgX%2FApOMoyd1R5%2FxAAAAAElFTkSuQmCC)](https://linuxgsm.com) [![Build Status](https://travis-ci.com/GameServerManagers/LinuxGSM.svg?branch=master)](https://travis-ci.com/GameServerManagers/LinuxGSM) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3e98be27840043a090c3ab6e35db44b0)](https://app.codacy.com/app/GameServerManagers/LinuxGSM?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Grade_Dashboard) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/9ef77095e98a43618ddd57381f86b4be)](https://www.codacy.com/manual/GameServerManagers/LinuxGSM?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Coverage) [![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://linuxgsm.com/discord) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE) [![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MDg2QTAyQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkE3MDg2QTAzQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTcwODZBMDBBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTcwODZBMDFBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciLz4gPC9yZGY6RGVzY3JpcHRpb24%2BIDwvcmRmOlJERj4gPC94OnhtcG1ldGE%2BIDw%2FeHBhY2tldCBlbmQ9InIiPz6lm45hAAADkklEQVR42qyVa0yTVxzGn7d9Wy03MS2ii8s%2BeokYNQSVhCzOjXZOFNF4jx%2BMRmPUMEUEqVG36jo2thizLSQSMd4N8ZoQ8RKjJtooaCpK6ZoCtRXKpRempbTv5ey83bhkAUphz8fznvP8znn%2B%2F3NeEEJgNBoRRSmz0ub%2FfuxEacBg%2FDmYtiCjgo5NG2mBXq%2BH5I1ogMRk9Zbd%2BQU2e1ML6VPLOyf5tvBQ8yT1lG10imxsABm7SLs898GTpyYynEzP60hO3trHDKvMigUwdeaceacqzp7nOI4n0SSIIjl36ao4Z356OV07fSQAk6xJ3XGg%2BLCr1d1OYlVHp4eUHPnerU79ZA%2F1kuv1JQMAg%2BE4O2P23EumF3VkvHprsZKMzKwbRUXFEyTvSIEmTVbrysp%2BWr8wfQHGK6WChVa3bKUmdWou%2BjpArdGkzZ41c1zG%2Fu5uGH4swzd561F%2BuhIT4%2BLnSuPsv9%2BJKIpjNr9dXYOyk7%2FBZrcjIT4eCnoKgedJP4BEqhG77E3NKP31FO7cfQA5K0dSYuLgz2TwCWJSOBzG6crzKK%2BohNfni%2Bx6OMUMMNe%2Fgf7ocbw0v0acKg6J8Ql0q%2BT%2FAXR5PNi5dz9c71upuQqCKFAD%2BYhrZLEAmpodaHO3Qy6TI3NhBpbrshGtOWKOSMYwYGQM8nJzoFJNxP2HjyIQho4PewK6hBktoDcUwtIln4PjOWzflQ%2Be5yl0yCCYgYikTclGlxadio%2BBQCSiW1UXoVGrKYwH4RgMrjU1HAB4vR6LzWYfFUCKxfS8Ftk5qxHoCUQAUkRJaSEokkV6Y%2F%2BJUOC4hn6A39NVXVBYeNP8piH6HeA4fPbpdBQV5KOx0QaL1YppX3Jgk0TwH2Vg6S3u%2BdB91%2B%2FpuNYPYFl5uP5V7ZqvsrX7jxqMXR6ff3gCQSTzFI0a1TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/) [![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors) +[![LinuxGSM](https://img.shields.io/badge/-LinuxGSM-2b2b2b.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACsAAABACAYAAACDbo5ZAAAGD0lEQVR4AcWYa2wUVRvHz75c2vJ2disXoUBEVIioRAx%2BMIFA1IRwUS6KCCiIKBrvhEYiiGm5iBgk8QOGEgUUDYTttmVZWFr2UmwURS6iYAoCtmisElSsdHdbkT7%2BTzoNy%2BGc2dm54C%2F5Rdkz85x%2FZ86ZOXOYXYhIg3Phx%2FA4PAcv6f%2Btg5vhHJjP3EcZsgsshufJHH%2FAJbDztQ7aG35J1vgCXn%2BtgvrgEbLHYei9FmE3kDOUuh10OGwjZ7gEh7kZ9gNyllK3gnrg7%2BQs56DHjbCDyB0GuRF2ArnDeDfCziF3mO1G2FfJHRa4EXYpuUOxG2GXkzuUuBH2TXKH5W6ELSV3eM%2BNsOUk5yQcAY8p2uvgSPitor3MjbB1UOQXOFBvHwpbhPYWOExvL4SNUOQ7p4P2JTlzhOPmCu0vCu1PQpE2WOhk2MdJjk9y7HNwP1wEPUJbAcmZ6WTYrYolnifbxZBiibnFySHQCkUaLdY7C0V4%2FT5OhF1JcuIW6%2B0lOcvsBi2Ezao3j8Ov7Quwj52w60jNKIs1R5GatVaDDoEXSU4D7GSxbidYT3IuwjusFK0mNUVMwaZNNbl%2B%2F87hoVCom0HthaQmnG3QB0lNPcxlCvz%2B0GtlZTuorCxYYlA%2FDzbY%2FnrAgV3hCVLzCDMgEAi9wMMi9IIM%2FUwnNXWwi5mwRaSmmmXA798xq%2F3Khp420VeE1LyS6eQeBhttSXgzywCCToIUCOyYZvKLOWWwkdfd6ORVpGYJM0F5efDe9mEQHGty2BWTmhVGO4PNBmOoKzMBxmo%2FhD25dWvljSbD5hjMkb9gT9lJq63Mzi1bKkbjloc7xBWtwiRrDASCVRi%2FRxA8if%2BvrawMTzYI%2FACpeUv2KFFtDcUyTKilCHcis8G1Ga7wHpLzG8wVFs1K7jaeUKHZfIxmkj9%2FM4S9x9RGiMEudo0QbCVu9Xqn5PWEwLUk5%2FP0iaXac53I0kAH9Sau4m54lo%2FdTMfyekLYKQZ7ub34AbMMlmw5irC2VYTN0fuVMYMf8JHxJ7L7YYXAlSRnI2%2F8RtH4siTsDMz%2BZ5yS15OEXUxyDjGD1%2BvEq8MG16CDzY6JepKwT6geYbzxb0XjGMl7vwGSgzZIwo4nOa1M8Yr9Afb%2Fj8L21%2FsXaeaNZ2A6KTiEASph%2F0vF80cn4tokqu79fzfCUk2vfF4%2FFdFGEjGPHvg2yWrsDG%2F4%2BqpZB8jPOiXjWk0y5iXdM3XhKUvxBTA9UvHuvNPh%2Bzb%2BWj10z6nwuHWBbQFMvNCjKnn7qd1jS%2Fnx9VX3b6jC%2BbwOr5eMe3%2B83IcW4%2F3qgT%2BUTbA9srGaiHsn8AKiF6Ld%2FxF%2FOx6eeAJXabvK78MTTornNMd6XJTVR7%2Fj9bBjhFxV%2FMc1kJOAy2AeA%2FgrV4mFVDZFCqm8rEJ6qysCAWqK9iaztRJRbWXa4moFTELOav7jY%2FqAvoXp0Gc9NX7bIZl17%2FZl0rC1wRLeno0NvP%2B0CTcYNnS8wW6CtzNANaxzKqo9hRNOQ8rGo7tmSsMe2zWdt2frqVRcm5s2fofCgawDNHRNxnyfqgsYez4y4ADCjRM9H73hsNWafILTQdaFiSTj%2BQ%2FxA6yH7d%2BCmR8XbYr0a7VTF2N4siSsb5qdos3R6%2FjGxpULFfw7EfORnbrI9TAToX0sD40%2F2ylcGdh2Rdhg%2BSf2gka9jRTqK9%2BGwgHz7RTfVbHxirDhivdthYUvMRX8aYAD9lstvi%2B0aDL2DUZ0eCBUNNVG0IP65FLTWqPdiqdC0koHTVXe7iyNRG23QotBEy1RbTAzQyrmnYUT2rLsoA13JpcB4eVC2daBM1g2JGLekmwf5On7EJfngfZTNnVSce8bFjaTmQdvs%2FXmO%2FJVpoXdx3RSUe9O00Fj3nUdy0RLgRHiHXOPGW1h2uKZ07c9rG%2Bxyefp23pQeyBIEQoavYlakrG8fnrY5yHn2fbxXzAgw7m8bT5zkkSk4C7cpmOK21esB%2FXAQ5DzFfTo43%2BF%2FDzf0eZ4wZ3MDSjMcvD6nIeOahGgia%2FyU3HforTPkWkwnakdn0cI9jqfbPjD%2FuQLJr6644snlgX%2FApOMoyd1R5%2FxAAAAAElFTkSuQmCC)](https://linuxgsm.com) [![Build Status](https://travis-ci.com/GameServerManagers/LinuxGSM.svg?branch=master)](https://travis-ci.com/GameServerManagers/LinuxGSM) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3e98be27840043a090c3ab6e35db44b0)](https://app.codacy.com/app/GameServerManagers/LinuxGSM?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Grade_Dashboard) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/9ef77095e98a43618ddd57381f86b4be)](https://www.codacy.com/manual/GameServerManagers/LinuxGSM?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Coverage) [![Backup Repo](https://github.com/GameServerManagers/LinuxGSM/workflows/Backup%20Repo/badge.svg)](https://bitbucket.org/GameServerManagers/linuxgsm) [![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://linuxgsm.com/discord) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE) [![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MDg2QTAyQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkE3MDg2QTAzQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTcwODZBMDBBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTcwODZBMDFBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciLz4gPC9yZGY6RGVzY3JpcHRpb24%2BIDwvcmRmOlJERj4gPC94OnhtcG1ldGE%2BIDw%2FeHBhY2tldCBlbmQ9InIiPz6lm45hAAADkklEQVR42qyVa0yTVxzGn7d9Wy03MS2ii8s%2BeokYNQSVhCzOjXZOFNF4jx%2BMRmPUMEUEqVG36jo2thizLSQSMd4N8ZoQ8RKjJtooaCpK6ZoCtRXKpRempbTv5ey83bhkAUphz8fznvP8znn%2B%2F3NeEEJgNBoRRSmz0ub%2FfuxEacBg%2FDmYtiCjgo5NG2mBXq%2BH5I1ogMRk9Zbd%2BQU2e1ML6VPLOyf5tvBQ8yT1lG10imxsABm7SLs898GTpyYynEzP60hO3trHDKvMigUwdeaceacqzp7nOI4n0SSIIjl36ao4Z356OV07fSQAk6xJ3XGg%2BLCr1d1OYlVHp4eUHPnerU79ZA%2F1kuv1JQMAg%2BE4O2P23EumF3VkvHprsZKMzKwbRUXFEyTvSIEmTVbrysp%2BWr8wfQHGK6WChVa3bKUmdWou%2BjpArdGkzZ41c1zG%2Fu5uGH4swzd561F%2BuhIT4%2BLnSuPsv9%2BJKIpjNr9dXYOyk7%2FBZrcjIT4eCnoKgedJP4BEqhG77E3NKP31FO7cfQA5K0dSYuLgz2TwCWJSOBzG6crzKK%2BohNfni%2Bx6OMUMMNe%2Fgf7ocbw0v0acKg6J8Ql0q%2BT%2FAXR5PNi5dz9c71upuQqCKFAD%2BYhrZLEAmpodaHO3Qy6TI3NhBpbrshGtOWKOSMYwYGQM8nJzoFJNxP2HjyIQho4PewK6hBktoDcUwtIln4PjOWzflQ%2Be5yl0yCCYgYikTclGlxadio%2BBQCSiW1UXoVGrKYwH4RgMrjU1HAB4vR6LzWYfFUCKxfS8Ftk5qxHoCUQAUkRJaSEokkV6Y%2F%2BJUOC4hn6A39NVXVBYeNP8piH6HeA4fPbpdBQV5KOx0QaL1YppX3Jgk0TwH2Vg6S3u%2BdB91%2B%2FpuNYPYFl5uP5V7ZqvsrX7jxqMXR6ff3gCQSTzFI0a1TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/) [LinuxGSM](https://linuxgsm.com) is the command-line tool for quick, simple deployment and management of Linux dedicated game servers. @@ -47,17 +47,9 @@ There are a various ways to get support, check out the [support](https://linuxgs ## :heart: Donate -If you would like to [donate](https://linuxgsm.com/donate) to the project there are several ways you can, via [Patreon](https://www.patreon.com/dgibbs), [Ko-Fi](https://ko-fi.com/dgibbs) and [PayPal](https://www.paypal.me/dgibbs64). I would like to thank everyone who has previously sent a donation. Since 2012 LinuxGSM has been steadily growing with new servers, features and improvements added regularly. +If you would like to [donate](https://linuxgsm.com/donate) to the project there are several ways you can, via [GitHub Sponsors](https://github.com/sponsors/dgibbs64), [Patreon](https://www.patreon.com/dgibbs) and [PayPal](https://www.paypal.me/dgibbs64). I would like to thank everyone who has previously sent a donation. Since 2012 LinuxGSM has been steadily growing with new servers, features and improvements added regularly. ## Contributors -Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - - - -
Daniel Gibbs
Daniel Gibbs

🐛 💻 🤔 💬 👀 🖋 📖 🚇
Frisasky
Frisasky

💬 🐛 💻
Kenny Lindelof
Kenny Lindelof

💬
Austin Shapiro
Austin Shapiro

🐛 💻
Marvin Lehmann
Marvin Lehmann

🐛 💻
Bourne-ID
Bourne-ID

👀 🖋 📖 🚇 👀
CedarLUG
CedarLUG

🐛 💻 🤔 💬 👀
UltimateByte
UltimateByte

🐛 💻 📖 🤔 👀
Attila
Attila

💻 🐛
- - - -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! +A big thank you goes to all the wonderful people who contribute ideas, code, docs and support to this project. From e7e26317f3121c6cd5ce83288337e174ee263265 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 May 2020 23:24:51 +0100 Subject: [PATCH 23/96] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 7491edbde..2b0f05ec1 100644 --- a/README.md +++ b/README.md @@ -52,4 +52,3 @@ If you would like to [donate](https://linuxgsm.com/donate) to the project there ## Contributors A big thank you goes to all the wonderful people who contribute ideas, code, docs and support to this project. - From fba832c3ea9946ffc81b41f19912c37e5cb3ed22 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 13 May 2020 23:45:39 +0100 Subject: [PATCH 24/96] Update git-sync.yml --- .github/workflows/git-sync.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index b3d5ea171..69f9ae146 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -1,7 +1,11 @@ name: Backup Repo # This action will sync the github repo with a backup bitbucket repo. # This will allow LinuxGSM to use Bitbucket as and alternative download if github fails. -on: push +on: + push: + branches: + - master + - 'develop' jobs: repo-sync: runs-on: ubuntu-latest From b769f2c6cbea40656242de5a6a516d5985df5e1e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 14 May 2020 00:28:53 +0100 Subject: [PATCH 25/96] fix(monitor): fix monitor timings and lockfile bug (#2882) * adjusting timings and fix lockfile bug * added sleep time to eol messages --- lgsm/functions/command_backup.sh | 16 +++++------ lgsm/functions/command_fastdl.sh | 3 -- lgsm/functions/command_mods_remove.sh | 1 - lgsm/functions/command_monitor.sh | 21 ++++---------- lgsm/functions/command_start.sh | 2 +- lgsm/functions/command_stop.sh | 6 +--- lgsm/functions/core_messages.sh | 41 ++++++++++++++++++++++++--- lgsm/functions/install_logs.sh | 1 - lgsm/functions/mods_core.sh | 4 --- 9 files changed, 52 insertions(+), 43 deletions(-) diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 7666156d4..537e86f1c 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -22,15 +22,15 @@ fn_backup_trap(){ fn_print_removed_eol_nl fn_script_log_info "Backup ${backupname}.tar.gz: REMOVED" # Remove lock file. - rm -f "${lockdir:?}/.backup.lock" + rm -f "${lockdir:?}/backup.lock" core_exit.sh } -# Check if a backup is pending or has been aborted using .backup.lock. +# Check if a backup is pending or has been aborted using backup.lock. fn_backup_check_lockfile(){ - if [ -f "${lockdir}/.backup.lock" ]; then + if [ -f "${lockdir}/backup.lock" ]; then fn_print_info_nl "Lock file found: Backup is currently running" - fn_script_log_error "Lock file found: Backup is currently running: ${lockdir}/.backup.lock" + fn_script_log_error "Lock file found: Backup is currently running: ${lockdir}/backup.lock" core_exit.sh fi } @@ -115,9 +115,9 @@ fn_backup_migrate_olddir(){ fn_backup_create_lockfile(){ # Create lockfile. - date '+%s' > "${lockdir}/.backup.lock" + date '+%s' > "${lockdir}/backup.lock" fn_script_log_info "Lockfile generated" - fn_script_log_info "${lockdir}/.backup.lock" + fn_script_log_info "${lockdir}/backup.lock" # trap to remove lockfile on quit. trap fn_backup_trap INT } @@ -138,7 +138,7 @@ fn_backup_compression(){ core_exit.sh fi - tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}/.backup.lock" ./. + tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}/backup.lock" ./. local exitcode=$? if [ ${exitcode} -ne 0 ]; then fn_print_fail_eol @@ -152,7 +152,7 @@ fn_backup_compression(){ fn_script_log_pass "Backup created: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')" fi # Remove lock file - rm -f "${lockdir:?}/.backup.lock" + rm -f "${lockdir:?}/backup.lock" } # Clear old backups according to maxbackups and maxbackupdays variables. diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index 335d02d9d..f6a5897db 100644 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -77,7 +77,6 @@ fn_clear_old_fastdl(){ fn_print_ok_eol_nl fn_script_log_pass "Clearing existing FastDL directory ${fastdldir}" fi - fn_sleep_time fi } @@ -95,7 +94,6 @@ fn_fastdl_dirs(){ fn_print_ok_eol_nl fn_script_log_pass "Creating web directory ${webdir}" fi - fn_sleep_time fi if [ ! -d "${fastdldir}" ]; then echo -en "creating fastdl directory ${fastdldir}..." @@ -109,7 +107,6 @@ fn_fastdl_dirs(){ fn_print_ok_eol_nl fn_script_log_pass "Creating fastdl directory ${fastdldir}" fi - fn_sleep_time fi } diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh index a8149e07b..35fd41d5f 100644 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/functions/command_mods_remove.sh @@ -87,7 +87,6 @@ if [ ${exitcode} -ne 0 ]; then else fn_print_ok_eol_nl fi -fn_sleep_time # Remove file list. echo -en "removing ${modcommand}-files.txt..." fn_sleep_time diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 1df51768f..4b621c0d5 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -16,17 +16,15 @@ fn_monitor_check_lockfile(){ fn_print_dots "Checking lockfile: " fn_print_checking_eol fn_script_log_info "Checking lockfile: CHECKING" - fn_sleep_time fn_print_error "Checking lockfile: No lockfile found: " fn_print_error_eol_nl fn_script_log_error "Checking lockfile: No lockfile found: ERROR" - fn_sleep_time echo -e "* Start ${selfname} to run monitor." core_exit.sh fi # Fix if lockfile is not unix time or contains letters - if [[ "$(cat "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then + if [ -f "${lockdir}/${selfname}.lock" ]&&[[ "$(cat "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then date '+%s' > "${lockdir}/${selfname}.lock" fi } @@ -37,11 +35,9 @@ fn_monitor_check_update(){ fn_print_dots "Checking active updates: " fn_print_checking_eol fn_script_log_info "Checking active updates: CHECKING" - fn_sleep_time fn_print_error_nl "Checking active updates: SteamCMD is currently checking for updates: " fn_print_error_eol fn_script_log_error "Checking active updates: SteamCMD is currently checking for updates: ERROR" - fn_sleep_time core_exit.sh fi } @@ -50,18 +46,15 @@ fn_monitor_check_session(){ fn_print_dots "Checking session: " fn_print_checking_eol fn_script_log_info "Checking session: CHECKING" - fn_sleep_time # uses status var from check_status.sh if [ "${status}" != "0" ]; then fn_print_ok "Checking session: " fn_print_ok_eol_nl fn_script_log_pass "Checking session: OK" - fn_sleep_time else fn_print_error "Checking session: " fn_print_fail_eol_nl fn_script_log_fatal "Checking session: FAIL" - fn_sleep_time alert="restart" alert.sh fn_script_log_info "Checking session: Monitor is restarting ${selfname}" @@ -76,7 +69,6 @@ fn_monitor_check_queryport(){ fn_print_dots "Checking port: " fn_print_checking_eol fn_script_log_info "Checking port: CHECKING" - fn_sleep_time if [ -n "${rconenabled}" ]&&[ "${rconenabled}" != "true" ]&&[ ${shortname} == "av" ]; then fn_print_warn "Checking port: Unable to query as rconport, rcon not enabled: " fn_print_warn_eol_nl @@ -86,7 +78,6 @@ fn_monitor_check_queryport(){ fn_print_error_eol_nl fn_script_log_error "Checking port: Unable to query as queryport is not set: ERROR" fi - fn_sleep_time core_exit.sh fi } @@ -112,14 +103,14 @@ 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" - fn_sleep_time # querydelay if [ "$(cat "${lockdir}/${selfname}.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_delay_eol_nl fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago" - fn_sleep_time + fn_script_log_info "Server started: $(date -d @$(cat lgsm/lock/bmdmserver.lock))" + fn_script_log_info "Current time: $(date)" monitorpass=1 core_exit.sh # will use query method selected in fn_monitor_loop @@ -139,7 +130,6 @@ for queryattempt in {1..5}; do fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_ok_eol_nl fn_script_log_pass "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: OK" - fn_sleep_time monitorpass=1 if [ "${querystatus}" == "0" ]; then # Add query data to log. @@ -170,7 +160,6 @@ for queryattempt in {1..5}; do fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_fail_eol fn_script_log_warn "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: FAIL" - fn_sleep_time # Monitor will try gamedig (if supported) for first 30s then gsquery before restarting. if [ "${querymethod}" == "gsquery" ]||[ "${querymethod}" == "tcp" ]; then # gsquery will fail if longer than 60s @@ -179,7 +168,6 @@ for queryattempt in {1..5}; do fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_fail_eol_nl fn_script_log_warn "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: FAIL" - fn_sleep_time # Send alert if enabled. alert="restartquery" alert.sh @@ -195,7 +183,8 @@ for queryattempt in {1..5}; do # Second counter will wait for 15s before breaking loop. for seconds in {1..15}; do - fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: WAIT" + fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: ${cyan}WAIT${default}" + sleep 0.5 totalseconds=$((totalseconds + 1)) if [ "${seconds}" == "15" ]; then break diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 497ca215a..6e4b445e8 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -62,7 +62,7 @@ fn_start_tmux(){ fi # Create lockfile - date > "${lockdir}/${selfname}.lock" + date '+%s' > "${lockdir}/${selfname}.lock" cd "${executabledir}" || exit tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${selfname}" "${executable} ${parms}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 3a27ba8d8..e8ef68fa4 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -33,7 +33,6 @@ fn_stop_graceful_ctrlc(){ fn_print_fail_eol_nl fn_script_log_error "Graceful: CTRL+c: FAIL" fi - fn_sleep_time } # Attempts graceful shutdown by sending a specified command. @@ -62,7 +61,6 @@ fn_stop_graceful_cmd(){ fn_print_fail_eol_nl fn_script_log_error "Graceful: sending \"${1}\": FAIL" fi - fn_sleep_time } # Attempts graceful shutdown of goldsrc using rcon 'quit' command. @@ -178,7 +176,6 @@ fn_stop_graceful_sdtd(){ fn_print_fail_eol_nl fn_script_log_warn "Graceful: telnet: expect not installed: FAIL" fi - fn_sleep_time } # Attempts graceful shutdown by sending /save /stop. @@ -208,7 +205,6 @@ fn_stop_graceful_avorion(){ fn_print_fail_eol_nl fn_script_log_error "Graceful: /save /stop: FAIL" fi - fn_sleep_time } fn_stop_graceful_select(){ @@ -240,7 +236,7 @@ fn_stop_tmux(){ fn_script_log_info "tmux kill-session: ${servername}" # Kill tmux session. tmux kill-session -t "${selfname}" > /dev/null 2>&1 - fn_sleep_time + sleep 0.5 check_status.sh if [ "${status}" == "0" ]; then fn_print_ok_nl "${servername}" diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index fd7a4b2e4..a4914bdd9 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -354,100 +354,133 @@ fn_prompt_yn(){ # OK fn_print_ok_eol(){ echo -en "${green}OK${default}" + fn_sleep_time } fn_print_ok_eol_nl(){ echo -e "${green}OK${default}" + fn_sleep_time } # FAIL fn_print_fail_eol(){ echo -en "${red}FAIL${default}" + fn_sleep_time } fn_print_fail_eol_nl(){ echo -e "${red}FAIL${default}" + fn_sleep_time } # ERROR fn_print_error_eol(){ echo -en "${red}ERROR${default}" + fn_sleep_time } fn_print_error_eol_nl(){ echo -e "${red}ERROR${default}" + fn_sleep_time +} + +# WAIT +fn_print_wait_eol(){ + echo -en "${cyan}WAIT${default}" + fn_sleep_time +} + +fn_print_wait_eol_nl(){ + echo -e "${cyan}WAIT${default}" + fn_sleep_time } # WARN fn_print_warn_eol(){ echo -en "${lightyellow}WARN${default}" + fn_sleep_time } fn_print_warn_eol_nl(){ echo -e "${lightyellow}WARN${default}" + fn_sleep_time } # INFO fn_print_info_eol(){ - echo -en "${red}INFO${default}" + echo -en "${cyan}INFO${default}" + fn_sleep_time } fn_print_info_eol_nl(){ - echo -e "${red}INFO${default}" + echo -e "${cyan}INFO${default}" + fn_sleep_time } # QUERYING fn_print_querying_eol(){ echo -en "${cyan}QUERYING${default}" + fn_sleep_time } fn_print_querying_eol_nl(){ echo -e "${cyan}QUERYING${default}" + fn_sleep_time } # CHECKING fn_print_checking_eol(){ echo -en "${cyan}CHECKING${default}" + fn_sleep_time } fn_print_checking_eol_nl(){ echo -e "${cyan}CHECKING${default}" + fn_sleep_time } # DELAY fn_print_delay_eol(){ echo -en "${green}DELAY${default}" + fn_sleep_time } fn_print_delay_eol_nl(){ echo -e "${green}DELAY${default}" + fn_sleep_time } # CANCELED fn_print_canceled_eol(){ - echo -en "${yellow}CANCELED${default}" + echo -en "${lightyellow}CANCELED${default}" + fn_sleep_time } fn_print_canceled_eol_nl(){ - echo -e "${yellow}CANCELED${default}" + echo -e "${lightyellow}CANCELED${default}" + fn_sleep_time } # REMOVED fn_print_removed_eol(){ echo -en "${red}REMOVED${default}" + fn_sleep_time } fn_print_removed_eol_nl(){ echo -e "${red}REMOVED${default}" + fn_sleep_time } # UPDATE fn_print_update_eol(){ echo -en "${cyan}UPDATE${default}" + fn_sleep_time } fn_print_update_eol_nl(){ echo -e "${cyan}UPDATE${default}" + fn_sleep_time } fn_print_ascii_logo(){ diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index be54eb42d..21c63ccbb 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -96,5 +96,4 @@ if [ -d "${rootdir}/Steam/logs" ]; then fi fi fi -fn_sleep_time fn_script_log_info "Logs installed" diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 7fc030210..8108e0d0e 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -59,7 +59,6 @@ fn_mod_lowercase(){ else fn_print_ok_eol_nl fi - fn_sleep_time fi } @@ -82,7 +81,6 @@ fn_mod_create_filelist(){ if [ -f "${modsdir}/.removedfiles.tmp" ]; then cat "${modsdir}/.removedfiles.tmp" >> "${modsdir}/${modcommand}-files.txt" fi - fn_sleep_time } # Copy the mod into serverfiles. @@ -392,7 +390,6 @@ fn_create_mods_dir(){ fn_print_ok_eol_nl fn_script_log_pass "Creating mod download dir ${modsdir}" fi - fn_sleep_time fi # Create mod install directory. if [ ! -d "${modinstalldir}" ]; then @@ -407,7 +404,6 @@ fn_create_mods_dir(){ fn_print_ok_eol_nl fn_script_log_pass "Creating mod install directory ${modinstalldir}" fi - fn_sleep_time fi # Create lgsm/data/${modsinstalledlist}. From c712dee139bb6dabb41da5c7dd70f9e618212679 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 15 May 2020 23:02:51 +0100 Subject: [PATCH 26/96] Update git-sync.yml --- .github/workflows/git-sync.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index 69f9ae146..addbba773 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -6,6 +6,7 @@ on: branches: - master - 'develop' + - 'feature/update-lgsm' jobs: repo-sync: runs-on: ubuntu-latest From 1c6c6112e143c189946fe799f5f4cd46786488ab Mon Sep 17 00:00:00 2001 From: n8rade <65125624+n8rade@users.noreply.github.com> Date: Tue, 19 May 2020 03:35:52 -0500 Subject: [PATCH 27/96] fix(update): Minecraft Bedrock issue causing update to not grab the version from logs --- lgsm/functions/update_minecraft_bedrock.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index 3336d13ff..564fb5c7b 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -33,7 +33,7 @@ fn_update_minecraft_localbuild(){ fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Log is generated and cleared on startup but filled on shutdown. - localbuild=$(grep Version "$(ls -tr "${consolelogdir}"/* 2>/dev/null)" | tail -1 | sed 's/.*Version //') + localbuild=$(grep Version "${consolelogdir}"/* 2>/dev/null | tail -1 | sed 's/.*Version //') if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}" fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" From 523daebd71cecfe3b785db3f4641ab0692c24676 Mon Sep 17 00:00:00 2001 From: WorthlessJ <43921046+WorthlessJ@users.noreply.github.com> Date: Tue, 19 May 2020 03:41:06 -0500 Subject: [PATCH 28/96] feat(install):Add config locations to install text (#2872) --- lgsm/functions/install_config.sh | 113 +++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 13558e4da..8851a2e70 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -142,27 +142,50 @@ fn_set_dst_config_vars(){ echo -e "" } +# Lists local config file locations +fn_list_config_locations(){ + echo -e "" + echo -e "${lightyellow}Config File Locations${default}" + echo -e "=================================" + if [ -n "${servercfgfullpath}" ]; then + if [ -f "${servercfgfullpath}" ]; then + echo -e "Game Server Config File: ${servercfgfullpath}" + elif [ -d "${servercfgfullpath}" ]; then + echo -e "Game Server Config Dir: ${servercfgfullpath}" + else + echo -e "Config file: ${red}${servercfgfullpath} (${red}FILE MISSING${default})" + fi + fi + echo -e "LinuxGSM Config: ${lgsmdir}/config-lgsm/${gameservername}" + echo -e "Documentation: https://docs.linuxgsm.com/configuration/game-server-config" + echo -e "" +} + if [ "${shortname}" == "sdtd" ]; then gamedirname="7DaysToDie" fn_default_config_local + fn_list_config_locations elif [ "${shortname}" == "ac" ]; then gamedirname="AssettoCorsa" array_configs+=( server_cfg.ini ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ahl" ]; then gamedirname="ActionHalfLife" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ahl2" ]; then gamedirname="ActionSource" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ark" ]; then gamedirname="ARKSurvivalEvolved" fn_check_cfgdir @@ -170,6 +193,7 @@ elif [ "${shortname}" == "ark" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "arma3" ]; then gamedirname="Arma3" fn_check_cfgdir @@ -177,18 +201,21 @@ elif [ "${shortname}" == "arma3" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bo" ]; then gamedirname="BallisticOverkill" array_configs+=( config.txt ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bo" ]; then gamedirname="BaseDefense" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bt" ]; then gamedirname="Barotrauma" fn_check_cfgdir @@ -196,6 +223,7 @@ elif [ "${shortname}" == "bt" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bt1944" ]; then gamedirname="Battalion1944" fn_check_cfgdir @@ -203,120 +231,140 @@ elif [ "${shortname}" == "bt1944" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bf1942" ]; then gamedirname="Battlefield1942" array_configs+=( serversettings.con ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bs" ]; then gamedirname="BladeSymphony" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bb" ]; then gamedirname="BrainBread" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bb2" ]; then gamedirname="BrainBread2" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bmdm" ]; then gamedirname="BlackMesa" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "cod" ]; then gamedirname="CallOfDuty" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "coduo" ]; then gamedirname="CallOfDutyUnitedOffensive" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "cod2" ]; then gamedirname="CallOfDuty2" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "cod4" ]; then gamedirname="CallOfDuty4" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "codwaw" ]; then gamedirname="CallOfDutyWorldAtWar" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "cc" ]; then gamedirname="CodenameCURE" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "cs" ]; then gamedirname="CounterStrike" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "cscz" ]; then gamedirname="CounterStrikeConditionZero" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "csgo" ]; then gamedirname="CounterStrikeGlobalOffensive" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "css" ]; then gamedirname="CounterStrikeSource" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "dod" ]; then gamedirname="DayOfDefeat" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "dods" ]; then gamedirname="DayOfDefeatSource" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "doi" ]; then gamedirname="DayOfInfamy" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "dmc" ]; then gamedirname="DeathmatchClassic" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "dst" ]; then gamedirname="DontStarveTogether" fn_check_cfgdir @@ -324,138 +372,161 @@ elif [ "${shortname}" == "dst" ]; then fn_fetch_default_config fn_default_config_remote fn_set_dst_config_vars + fn_list_config_locations elif [ "${shortname}" == "dab" ]; then gamedirname="DoubleActionBoogaloo" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "dys" ]; then gamedirname="Dystopia" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "eco" ]; then gamedirname="Eco" array_configs+=( Network.eco ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "etl" ]; then gamedirname="ETLegacy" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "fctr" ]; then gamedirname="Factorio" array_configs+=( server-settings.json ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "fof" ]; then gamedirname="FistfulofFrags" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "gmod" ]; then gamedirname="GarrysMod" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ges" ]; then gamedirname="GoldenEyeSource" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "hldm" ]; then gamedirname="HalfLifeDeathmatch" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "hldms" ]; then gamedirname="HalfLifeDeathmatchSource" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "opfor" ]; then gamedirname="OpposingForce" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "hl2dm" ]; then gamedirname="HalfLife2Deathmatch" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ins" ]; then gamedirname="Insurgency" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ios" ]; then gamedirname="IOSoccer" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "jc2" ]; then gamedirname="JustCause2" array_configs+=( config.lua ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "jc3" ]; then gamedirname="JustCause3" array_configs+=( config.json ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "kf" ]; then gamedirname="KillingFloor" array_configs+=( Default.ini ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "l4d" ]; then gamedirname="Left4Dead" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "l4d2" ]; then gamedirname="Left4Dead2" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "mc" ]; then gamedirname="Minecraft" array_configs+=( server.properties ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "mcb" ]; then gamedirname="MinecraftBedrock" array_configs+=( server.properties ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "mohaa" ]; then gamedirname="MedalOfHonorAlliedAssault" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "mh" ]; then gamedirname="Mordhau" fn_check_cfgdir @@ -463,41 +534,48 @@ elif [ "${shortname}" == "mh" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ns" ]; then gamedirname="NaturalSelection" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "nmrih" ]; then gamedirname="NoMoreRoominHell" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "nd" ]; then gamedirname="NuclearDawn" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "mta" ]; then gamedirname="MultiTheftAuto" fn_check_cfgdir array_configs+=( acl.xml mtaserver.conf vehiclecolors.conf ) fn_fetch_default_config fn_default_config_remote + fn_list_config_locations elif [ "${shortname}" == "mumble" ]; then gamedirname="Mumble" array_configs+=( murmur.ini ) fn_fetch_default_config fn_default_config_remote + fn_list_config_locations elif [ "${shortname}" == "pvkii" ]; then gamedirname="PiratesVikingandKnightsII" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "pz" ]; then gamedirname="ProjectZomboid" fn_check_cfgdir @@ -505,143 +583,167 @@ elif [ "${shortname}" == "pz" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "pc" ]; then gamedirname="ProjectCars" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "q2" ]; then gamedirname="Quake2" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "q3" ]; then gamedirname="Quake3Arena" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ql" ]; then gamedirname="QuakeLive" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "qw" ]; then gamedirname="QuakeWorld" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ricochet" ]; then gamedirname="Ricochet" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "rtcw" ]; then gamedirname="ReturnToCastleWolfenstein" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "rust" ]; then gamedirname="Rust" fn_check_cfgdir array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote + fn_list_config_locations elif [ "${shortname}" == "samp" ]; then gamedirname="SanAndreasMultiplayer" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ss3" ]; then gamedirname="SeriousSam3BFE" array_configs+=( server.ini ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "sol" ]; then gamedirname="Soldat" array_configs+=( soldat.ini ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "sof2" ]; then gamedirname="SoldierOfFortune2Gold" array_configs+=( server.cfg mapcycle.txt) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "sfc" ]; then gamedirname="SourceFortsClassic" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "squad" ]; then gamedirname="Squad" array_configs+=( Admins.cfg Bans.cfg License.cfg Server.cfg Rcon.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "sb" ]; then gamedirname="Starbound" array_configs+=( starbound_server.config ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "st" ]; then gamedirname="Stationeers" array_configs+=( default.ini ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "sven" ]; then gamedirname="SvenCoop" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "tf2" ]; then gamedirname="TeamFortress2" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "tfc" ]; then gamedirname="TeamFortressClassic" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ts" ]; then gamedirname="TheSpecialists" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ts3" ]; then gamedirname="TeamSpeak3" array_configs+=( ts3server.ini ) fn_fetch_default_config fn_default_config_remote + fn_list_config_locations elif [ "${shortname}" == "tw" ]; then gamedirname="Teeworlds" array_configs+=( server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "terraria" ]; then gamedirname="Terraria" array_configs+=( serverconfig.txt ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "tu" ]; then gamedirname="TowerUnite" fn_check_cfgdir @@ -649,64 +751,75 @@ elif [ "${shortname}" == "tu" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ut" ]; then gamedirname="UnrealTournament" array_configs+=( Game.ini Engine.ini ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ut2k4" ]; then gamedirname="UnrealTournament2004" array_configs+=( UT2004.ini ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "ut99" ]; then gamedirname="UnrealTournament99" array_configs+=( Default.ini ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "unt" ]; then gamedirname="Unturned" array_configs+=( Config.json ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "vs" ]; then gamedirname="VampireSlayer" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "wet" ]; then gamedirname="WolfensteinEnemyTerritory" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "wf" ]; then gamedirname="Warfork" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "wurm" ]; then gamedirname="WurmUnlimited" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "zmr" ]; then gamedirname="ZombieMasterReborn" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "zps" ]; then gamedirname="ZombiePanicSource" array_configs+=( server.cfg ) fn_fetch_default_config fn_default_config_remote fn_set_config_vars + fn_list_config_locations fi From a76cd3f7b3955f27cd5cdc34461c129ade8fb8d1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 19 May 2020 09:53:48 +0100 Subject: [PATCH 29/96] feat(update-lgsm): LinuxGSM update refactor (#2884) This update is a major refactor of how LinuxGSM updates itself. * will now use a version tag if downloading module for the first time. * added backup repo (Bitbucket) that will be used if Github is unavailable. * added ./gameserver and module version comparison this will allow instances to be correctly updated if there is a version mismatch. * UI changes when modules are fetched for the first time * added sessionname to fix broken tmux session is ./gameserver is called ./gameserver.sh * change apt to apt-get as recommended by the apt packages when dealing with scripts. --- lgsm/functions/check.sh | 4 + lgsm/functions/check_deps.sh | 14 +- lgsm/functions/check_status.sh | 2 +- lgsm/functions/check_steamcmd.sh | 12 +- lgsm/functions/check_version.sh | 19 ++ lgsm/functions/command_console.sh | 2 +- lgsm/functions/command_dev_query_raw.sh | 2 +- lgsm/functions/command_monitor.sh | 2 +- lgsm/functions/command_start.sh | 21 +- lgsm/functions/command_stop.sh | 14 +- lgsm/functions/command_update_linuxgsm.sh | 232 +++++++++++++++------- lgsm/functions/command_validate.sh | 1 - lgsm/functions/core_dl.sh | 192 ++++++++++++------ lgsm/functions/core_functions.sh | 12 ++ lgsm/functions/core_messages.sh | 11 + lgsm/functions/info_distro.sh | 2 +- lgsm/functions/info_stats.sh | 4 +- lgsm/functions/install_config.sh | 2 +- lgsm/functions/install_modules.sh | 16 ++ lgsm/functions/update_factorio.sh | 2 +- lgsm/functions/update_minecraft.sh | 2 +- lgsm/functions/update_mta.sh | 2 +- lgsm/functions/update_mumble.sh | 2 +- lgsm/functions/update_ts3.sh | 2 +- linuxgsm.sh | 134 +++++++++---- tests/tests_fctrserver.sh | 134 +++++++++---- tests/tests_jc2server.sh | 132 ++++++++---- tests/tests_mcserver.sh | 133 +++++++++---- tests/tests_ts3server.sh | 133 +++++++++---- 29 files changed, 873 insertions(+), 367 deletions(-) create mode 100644 lgsm/functions/check_version.sh create mode 100644 lgsm/functions/install_modules.sh diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index f56828561..3e8fa90a2 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -14,6 +14,10 @@ if [ "${commandname}" != "INSTALL" ]; then check_root.sh fi +if [ "${commandname}" != "UPDATE-LGSM" ]; then + check_version.sh +fi + check_tmuxception.sh if [ "$(whoami)" != "root" ]; then diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index ecfb28e6d..52f651e1b 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -26,13 +26,13 @@ fn_install_mono_repo(){ echo -en " \r" if [ "${distroid}" == "ubuntu" ]; then if [ "${distroversion}" == "18.04" ]; then - cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-bionic main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/ubuntu stable-bionic main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" eval "${cmd}" elif [ "${distroversion}" == "16.04" ]; then - cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt install apt-transport-https;echo 'deb https://download.mono-project.com/repo/ubuntu stable-xenial main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt-get install apt-transport-https;echo 'deb https://download.mono-project.com/repo/ubuntu stable-xenial main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" eval "${cmd}" elif [ "${distroversion}" == "14.04" ]; then - cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt install apt-transport-https;echo 'deb https://download.mono-project.com/repo/ubuntu stable-trusty main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt-get install apt-transport-https;echo 'deb https://download.mono-project.com/repo/ubuntu stable-trusty main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" eval "${cmd}" else fn_print_warn_nl "Installing Mono repository." @@ -43,13 +43,13 @@ fn_install_mono_repo(){ fi elif [ "${distroid}" == "debian" ]; then if [ "${distroversion}" == "10" ]; then - cmd="sudo apt install apt-transport-https dirmngr;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-buster main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-get install apt-transport-https dirmngr;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-buster main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" eval "${cmd}" elif [ "${distroversion}" == "9" ]; then - cmd="sudo apt install apt-transport-https dirmngr;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-stretch main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-get install apt-transport-https dirmngr;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;echo 'deb https://download.mono-project.com/repo/debian stable-stretch main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" eval "${cmd}" elif [ "${distroversion}" == "8" ]; then - cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt install apt-transport-https;echo 'deb https://download.mono-project.com/repo/debian stable-jessie main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update" + cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt-get install apt-transport-https;echo 'deb https://download.mono-project.com/repo/debian stable-jessie main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt-get update" eval "${cmd}" else echo -e "Mono auto install not available for ${distroname}" @@ -248,7 +248,7 @@ fn_found_missing_deps(){ sleep 1 echo -en " \r" if [ "$(command -v dpkg-query 2>/dev/null)" ]; then - cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; sudo dpkg --add-architecture i386; sudo apt update; sudo apt -y install ${array_deps_missing[*]}" + cmd="echo steamcmd steam/question select \"I AGREE\" | sudo debconf-set-selections; echo steamcmd steam/license note '' | sudo debconf-set-selections; sudo dpkg --add-architecture i386; sudo apt-get update; sudo apt-get -y install ${array_deps_missing[*]}" eval "${cmd}" elif [ "$(command -v dnf 2>/dev/null)" ]; then cmd="sudo dnf -y install ${array_deps_missing[*]}" diff --git a/lgsm/functions/check_status.sh b/lgsm/functions/check_status.sh index 8e4c20bb1..178adcf6b 100644 --- a/lgsm/functions/check_status.sh +++ b/lgsm/functions/check_status.sh @@ -7,4 +7,4 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -status=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | grep -Ecx "^${selfname}") +status=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | grep -Ecx "^${sessionname}") diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index b8dbffd87..b42d581df 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -13,7 +13,17 @@ fn_install_steamcmd(){ if [ ! -d "${steamcmddir}" ]; then mkdir -p "${steamcmddir}" fi - fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "${tmpdir}" "steamcmd_linux.tar.gz" + remote_fileurl="${1}" + remote_fileurl_backup="${2}" + remote_fileurl_name="${3}" + remote_fileurl_backup_name="${4}" + local_filedir="${5}" + local_filename="${6}" + chmodx="${7:-0}" + run="${8:-0}" + forcedl="${9:-0}" + md5="${10:-0}" + fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "" "norun" "noforce" "nomd5" fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}" chmod +x "${steamcmddir}/steamcmd.sh" } diff --git a/lgsm/functions/check_version.sh b/lgsm/functions/check_version.sh new file mode 100644 index 000000000..6db78091d --- /dev/null +++ b/lgsm/functions/check_version.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# LinuxGSM command_version.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Will run update-lgsm if gameserver.sh and modules version does not match +# this will allow gameserver.sh to update - useful for multi instance servers. + +if [ -n "${modulesversion}" ]&&[ -n "${version}" ]&&[ "${version}" != "${modulesversion}" ]; then + exitbypass=1 + echo -e "" + fn_print_error_nl "LinuxGSM version mismatch" + echo -e "" + echo -e "* ${selfname}: ${version}" + echo -e "* modules: ${modulesversion}" + echo -e "" + fn_sleep_time + fn_script_log_error "LinuxGSM Version mismatch: ${selfname}: ${version}: modules: ${modulesversion}" + command_update_linuxgsm.sh +fi diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index c3e3257be..18e674652 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -26,7 +26,7 @@ check_status.sh if [ "${status}" != "0" ]; then fn_print_ok_nl "Accessing console" fn_script_log_pass "Console accessed" - tmux attach-session -t "${selfname}" + tmux attach-session -t "${sessionname}" fn_print_ok_nl "Closing console" fn_script_log_pass "Console closed" else diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index cdd539ce9..b96036c2f 100644 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -44,7 +44,7 @@ echo -e "" echo -e "./query_gsquery.py -a \"${ip}\" -p \"${queryport}\" -e \"${querytype}\"" echo -e "" if [ ! -f "${functionsdir}/query_gsquery.py" ]; then - fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" + fn_fetch_file_git "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" fi "${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${querytype}" diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 4b621c0d5..a66c362b4 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -84,7 +84,7 @@ fn_monitor_check_queryport(){ fn_query_gsquery(){ if [ ! -f "${functionsdir}/query_gsquery.py" ]; then - fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" + fn_fetch_file_git "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" fi "${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1 querystatus="$?" diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 6e4b445e8..7ba90159d 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -64,7 +64,7 @@ fn_start_tmux(){ # Create lockfile date '+%s' > "${lockdir}/${selfname}.lock" cd "${executabledir}" || exit - tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${selfname}" "${executable} ${parms}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" + tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${executable} ${parms}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" # Create logfile. touch "${consolelog}" @@ -79,7 +79,7 @@ fn_start_tmux(){ fn_script_log "Tmux version: master (user compiled)" echo -e "Tmux version: master (user compiled)" >> "${consolelog}" if [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then - tmux pipe-pane -o -t "${selfname}" "exec cat >> '${consolelog}'" + tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi elif [ "${tmuxversion}" ]; then # Get the digit version of tmux. @@ -97,19 +97,19 @@ fn_start_tmux(){ Currently installed: $(tmux -V)" > "${consolelog}" # Console logging enable or not set. elif [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then - tmux pipe-pane -o -t "${selfname}" "exec cat >> '${consolelog}'" + tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi else echo -e "Unable to detect tmux version" >> "${consolelog}" fn_script_log_warn "Unable to detect tmux version" fi -# Console logging disabled. -if [ "${consolelogging}" == "off" ]; then - echo -e "Console logging disabled by user" >> "${consolelog}" - fn_script_log_info "Console logging disabled by user" -fi -fn_sleep_time + # Console logging disabled. + if [ "${consolelogging}" == "off" ]; then + echo -e "Console logging disabled by user" >> "${consolelog}" + fn_script_log_info "Console logging disabled by user" + fi + fn_sleep_time # If the server fails to start. check_status.sh @@ -122,7 +122,7 @@ fn_sleep_time echo -e "" echo -e "Command" echo -e "=================================" - echo -e "tmux new-session -d -s \"${selfname}\" \"${executable} ${parms}\"" | tee -a "${lgsmlog}" + echo -e "tmux new-session -d -s \"${sessionname}\" \"${executable} ${parms}\"" | tee -a "${lgsmlog}" echo -e "" echo -e "Error" echo -e "=================================" @@ -156,7 +156,6 @@ fn_sleep_time fi fi fi - core_exit.sh else fn_print_ok "${servername}" diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index e8ef68fa4..6ea4f4d7a 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -14,7 +14,7 @@ fn_stop_graceful_ctrlc(){ fn_print_dots "Graceful: CTRL+c" fn_script_log_info "Graceful: CTRL+c" # Sends quit. - tmux send-keys -t "${selfname}" C-c > /dev/null 2>&1 + tmux send-keys -t "${sessionname}" C-c > /dev/null 2>&1 # Waits up to 30 seconds giving the server time to shutdown gracefuly. for seconds in {1..30}; do check_status.sh @@ -42,7 +42,7 @@ fn_stop_graceful_cmd(){ fn_print_dots "Graceful: sending \"${1}\"" fn_script_log_info "Graceful: sending \"${1}\"" # Sends specific stop command. - tmux send -t "${selfname}" "${1}" ENTER > /dev/null 2>&1 + tmux send -t "${sessionname}" "${1}" ENTER > /dev/null 2>&1 # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. for ((seconds=1; seconds<=${2}; seconds++)); do check_status.sh @@ -70,7 +70,7 @@ fn_stop_graceful_goldsrc(){ fn_print_dots "Graceful: sending \"quit\"" fn_script_log_info "Graceful: sending \"quit\"" # sends quit - tmux send -t "${selfname}" quit ENTER > /dev/null 2>&1 + tmux send -t "${sessionname}" quit ENTER > /dev/null 2>&1 # Waits 3 seconds as goldsrc servers restart with the quit command. for seconds in {1..3}; do sleep 1 @@ -183,10 +183,10 @@ fn_stop_graceful_avorion(){ fn_print_dots "Graceful: /save /stop" fn_script_log_info "Graceful: /save /stop" # Sends /save. - tmux send-keys -t "${selfname}" /save ENTER > /dev/null 2>&1 + tmux send-keys -t "${sessionname}" /save ENTER > /dev/null 2>&1 sleep 5 # Sends /quit. - tmux send-keys -t "${selfname}" /stop ENTER > /dev/null 2>&1 + tmux send-keys -t "${sessionname}" /stop ENTER > /dev/null 2>&1 # Waits up to 30 seconds giving the server time to shutdown gracefuly. for seconds in {1..30}; do check_status.sh @@ -233,9 +233,9 @@ fn_stop_graceful_select(){ fn_stop_tmux(){ fn_print_dots "${servername}" - fn_script_log_info "tmux kill-session: ${servername}" + fn_script_log_info "tmux kill-session: ${sessionname}: ${servername}" # Kill tmux session. - tmux kill-session -t "${selfname}" > /dev/null 2>&1 + tmux kill-session -t "${sessionname}" > /dev/null 2>&1 sleep 0.5 check_status.sh if [ "${status}" == "0" ]; then diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 90c2f0446..1fe1e39fa 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -8,109 +8,197 @@ commandname="UPDATE-LGSM" commandaction="Updating LinuxGSM" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_print_dots "Updating LinuxGSM" check.sh + +fn_print_dots "" fn_script_log_info "Updating LinuxGSM" -echo -en "\n" -if [ -z "${legacymode}" ]; then - # Check and update _default.cfg. - echo -en " checking config _default.cfg...\c" - config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) - if [ "${config_file_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_info "checking config _default.cfg: UPDATE" - rm -f "${configdirdefault:?}/config-lgsm/${gameservername}/_default.cfg" - fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforce" "nomd5" - alert="config" - alert.sh +fn_print_dots "Selecting repo" +fn_script_log_info "Selecting repo" +# Select remotereponame +curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1>/dev/null +if [ $? != "0" ]; then + curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1>/dev/null + if [ $? != "0" ]; then + fn_print_fail_nl "Selecting repo: Unable to to access GitHub or Bitbucket repositories" + fn_script_log_fatal "Selecting repo: Unable to to access GitHub or Bitbucket repositories" + core_exit.sh else - fn_print_ok_eol_nl - fn_script_log_info "checking config _default.cfg: OK" + remotereponame="Bitbucket" + fn_print_ok_nl "Selecting repo: ${remotereponame}" fi +else + remotereponame="GitHub" + fn_print_ok_nl "Selecting repo: ${remotereponame}" +fi + +# Check _default.cfg. +echo -en "checking ${remotereponame} config _default.cfg...\c" +fn_script_log_info "Checking ${remotereponame} config _default.cfg" +if [ "${remotereponame}" == "GitHub" ]; then + curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null +else + curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null +fi +if [ $? != "0" ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Checking ${remotereponame} config _default.cfg" + fn_script_log_fatal "Curl returned error: $?" + core_exit.sh +fi + +if [ "${remotereponame}" == "GitHub" ]; then + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) +else + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) +fi + +if [ "${config_file_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${remotereponame} config _default.cfg" + rm -f "${configdirdefault:?}/config-lgsm/${gameservername:?}/_default.cfg" + fn_fetch_file_github "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "nochmodx" "norun" "noforce" "nomd5" + alert="config" + alert.sh +else + fn_print_ok_eol_nl + fn_script_log_pass "Checking ${remotereponame} config _default.cfg" +fi + +# Check linuxsm.sh +echo -en "checking ${remotereponame} linuxgsm.sh...\c" +if [ "${remotereponame}" == "GitHub" ]; then + curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1>/dev/null +else + curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1>/dev/null +fi +if [ $? != "0" ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Checking ${remotereponame} linuxgsm.sh" + fn_script_log_fatal "Curl returned error: $?" + core_exit.sh +fi - echo -en " checking linuxgsm.sh...\c" +if [ "${remotereponame}" == "GitHub" ]; then tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) - if [ "${tmp_script_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_info "checking linuxgsm.sh: UPDATE" - rm -f "${tmpdir:?}/linuxgsm.sh" - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" - # Compare selfname against linuxgsm.sh in the tmp dir. Ignoring server specific vars. +else + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh")) +fi + +if [ "${tmp_script_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${remotereponame} linuxgsm.sh" + rm -f "${tmpdir:?}/linuxgsm.sh" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" +else + fn_print_ok_eol_nl + fn_script_log_pass "Checking ${remotereponame} linuxgsm.sh" +fi + +# Check gameserver.sh +# Compare gameserver.sh against linuxgsm.sh in the tmp dir. +# Ignoring server specific vars. +echo -en "checking ${selfname}...\c" +fn_script_log_info "Checking ${selfname}" +echo "TMPDIR: ${tmpdir}" +echo "ROOTDIR: ${rootdir}" +echo "SELFNAME: ${selfname}" +script_diff=$(diff <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${tmpdir}/linuxgsm.sh") <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${rootdir}/${selfname}")) +echo "==========================================" +if [ "${script_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${selfname}" + echo -en "backup ${selfname}...\c" + fn_script_log_info "Backup ${selfname}" + if [ ! -d "${backupdir}/script" ]; then + mkdir -p "${backupdir}/script" + fi + cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Backup ${selfname}" + core_exit.sh else - fn_script_log_info "checking linuxgsm.sh: OK" fn_print_ok_eol_nl + fn_script_log_pass "Backup ${selfname}" + echo -e "backup location ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" + fn_script_log_pass "Backup location ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" fi - echo -en " checking ${selfname}...\c" - script_diff=$(diff <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${tmpdir}/linuxgsm.sh") <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${rootdir}/${selfname}")) - if [ "${script_diff}" != "" ]; then - fn_print_update_eol_nl - echo -en " backup ${selfname}...\c" - mkdir -p "${backupdir}/script/" - cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" - if [ $? -ne 0 ]; then - fn_print_fail_eol_nl - core_exit.sh - else - fn_print_ok_eol_nl - echo -e " Backup: ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" - fi - echo -en " fetching ${selfname}...\c" - cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" - sed -i "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${rootdir}/${selfname}" - sed -i "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${rootdir}/${selfname}" - sed -i "s/gamename=\"core\"/gamename=\"${gamename}\"/g" "${rootdir}/${selfname}" - exitcode=$? - if [ "${exitcode}" != "0" ]; then - fn_print_fail_eol_nl - core_exit.sh - else - fn_print_ok_eol_nl - fi + + echo -en "copying ${selfname}...\c" + fn_script_log_info "copying ${selfname}" + cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" + sed -i "s+shortname=\"core\"+shortname=\"${shortname}\"+g" "${rootdir}/${selfname}" + sed -i "s+gameservername=\"core\"+gameservername=\"${gameservername}\"+g" "${rootdir}/${selfname}" + sed -i "s+gamename=\"core\"+gamename=\"${gamename}\"+g" "${rootdir}/${selfname}" + sed -i "s+githubuser=\"GameServerManagers\"+githubuser=\"${githubuser}\"+g" "${rootdir}/${selfname}" + sed -i "s+githubrepo=\"LinuxGSM\"+githubrepo=\"${githubrepo}\"+g" "${rootdir}/${selfname}" + sed -i "s+githubbranch=\"master\"+githubbranch=\"${githubbranch}\"+g" "${rootdir}/${selfname}" + + if [ $? != "0" ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "copying ${selfname}" + core_exit.sh else fn_print_ok_eol_nl + fn_script_log_pass "copying ${selfname}" fi +else + fn_print_ok_eol_nl + fn_script_log_info "Checking ${selfname}" fi -# Check and update functions. -if [ "${functionsdir}" ]; then +# Check and update modules. +if [ -n "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then cd "${functionsdir}" || exit for functionfile in * do - echo -en " checking function ${functionfile}...\c" + # check if module exists in the repo and remove if missing. + # commonly used if module names change. + echo -en "checking ${remotereponame} module ${functionfile}...\c" github_file_url_dir="lgsm/functions" - get_function_file=$(curl --fail -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}") - exitcode=$? - function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --fail -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) - if [ ${exitcode} -ne 0 ]; then - fn_print_fail_eol_nl - echo -en " removing unknown function ${functionfile}...\c" - fn_script_log_fatal "removing unknown function ${functionfile}" + if [ "${remotereponame}" == "GitHub" ]; then + curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1>/dev/null + else + curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1>/dev/null + fi + if [ $? -ne 0 ]; then + fn_print_error_eol_nl + fn_script_log_error "Checking ${remotereponame} module ${functionfile}" + echo -en "removing module ${functionfile}...\c" if ! rm -f "${functionfile:?}"; then fn_print_fail_eol_nl + fn_script_log_fatal "Removing module ${functionfile}" core_exit.sh else fn_print_ok_eol_nl + fn_script_log_pass "Removing module ${functionfile}" fi - elif [ "${function_file_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_info "checking function ${functionfile}: UPDATE" - rm -rf "${functionsdir:?}/${functionfile}" - fn_update_function else - fn_print_ok_eol_nl + # compare file + if [ "${remotereponame}" == "GitHub" ]; then + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}")) + else + function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}")) + fi + + # results + if [ "${function_file_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${remotereponame} module ${functionfile}" + rm -rf "${functionsdir:?}/${functionfile}" + fn_update_function + else + fn_print_ok_eol_nl + fn_script_log_pass "Checking ${remotereponame} module ${functionfile}" + fi fi done fi fi -if [ "${exitcode}" != "0" ]&&[ -n "${exitcode}" ]; then - fn_print_fail "Updating functions" - fn_script_log_fatal "Updating functions" -else - fn_print_ok "Updating functions" - fn_script_log_pass "Updating functions" -fi +fn_print_ok "Updating functions" +fn_script_log_pass "Updating functions" core_exit.sh diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 5ddf5ffde..276458e48 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -79,7 +79,6 @@ fn_stop_warning(){ fn_print_dots "Validating server" fn_print_dots "Validating server: SteamCMD" check.sh -check_status.sh if [ "${status}" != "0" ]; then fn_stop_warning exitbypass=1 diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 5294b8a9d..8e2888add 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -112,54 +112,99 @@ fn_fetch_trap(){ fn_fetch_file(){ remote_fileurl="${1}" - local_filedir="${2}" - local_filename="${3}" - chmodx="${4:-0}" - run="${5:-0}" - forcedl="${6:-0}" - md5="${7:-0}" + remote_fileurl_backup="${2}" + remote_fileurl_name="${3}" + remote_fileurl_backup_name="${4}" + local_filedir="${5}" + local_filename="${6}" + chmodx="${7:-0}" + run="${8:-0}" + forcedl="${9:-0}" + md5="${10:-0}" # Download file if missing or download forced. if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then - if [ ! -d "${local_filedir}" ]; then - mkdir -p "${local_filedir}" - fi - # Trap will remove part downloaded files if canceled. - trap fn_fetch_trap INT - # Larger files show a progress bar. - if [ "${local_filename##*.}" == "bz2" ]||[ "${local_filename##*.}" == "gz" ]||[ "${local_filename##*.}" == "zip" ]||[ "${local_filename##*.}" == "jar" ]||[ "${local_filename##*.}" == "xz" ]; then - echo -en "downloading ${local_filename}..." - fn_sleep_time - echo -en "\033[1K" - curlcmd=$(curl --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}") - echo -en "downloading ${local_filename}..." + # If backup fileurl exists include it. + if [ -n "${remote_fileurl_backup}" ]; then + # counter set to 0 to allow second try + counter=0 + remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) else - echo -en " fetching ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + # counter set to 1 to not allow second try + counter=1 + remote_fileurls_array=( remote_fileurl ) fi - local exitcode=$? - if [ ${exitcode} -ne 0 ]; then - fn_print_fail_eol_nl - if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Downloading ${local_filename}" - echo -e "${remote_fileurl}" >> "${lgsmlog}" - echo -e "${curlcmd}" >> "${lgsmlog}" + for remote_fileurl_array in "${remote_fileurls_array[@]}" + do + if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then + fileurl="${remote_fileurl}" + fileurl_name="${remote_fileurl_name}" + elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then + fileurl="${remote_fileurl_backup}" + fileurl_name="${remote_fileurl_backup_name}" fi - echo -e "${remote_fileurl}" - echo -e "${curlcmd}" - core_exit.sh - else - fn_print_ok_eol_nl - if [ -f "${lgsmlog}" ]; then - fn_script_log_pass "Downloading ${local_filename}" + counter=$((counter+1)) + if [ ! -d "${local_filedir}" ]; then + mkdir -p "${local_filedir}" fi - fi - # Remove trap. - trap - INT - # Make file executable if chmodx is set. - if [ "${chmodx}" == "chmodx" ]; then - chmod +x "${local_filedir}/${local_filename}" - fi + # Trap will remove part downloaded files if canceled. + trap fn_fetch_trap INT + # Larger files show a progress bar. + if [ "${local_filename##*.}" == "bz2" ]||[ "${local_filename##*.}" == "gz" ]||[ "${local_filename##*.}" == "zip" ]||[ "${local_filename##*.}" == "jar" ]||[ "${local_filename##*.}" == "xz" ]; then + echo -en "downloading ${local_filename}..." + fn_sleep_time + echo -en "\033[1K" + curlcmd=$(curl --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}") + echo -en "downloading ${local_filename}..." + else + echo -en "fetching ${fileurl_name} ${local_filename}...\c" + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) + fi + local exitcode=$? + + # Download will fail if downloads a html file. + if [ -f "${local_filedir}/${local_filename}" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + rm "${local_filedir:?}/${local_filename:?}" + local exitcode=2 + fi + fi + + # On first try will error. On second try will fail. + if [ ${exitcode} -ne 0 ]; then + if [ ${counter} -ge 2 ]; then + fn_print_fail_eol_nl + if [ -f "${lgsmlog}" ]; then + fn_script_log_fatal "Downloading ${local_filename}" + fn_script_log_fatal "${fileurl}" + fi + core_exit.sh + else + fn_print_error_eol_nl + if [ -f "${lgsmlog}" ]; then + fn_script_log_error "Downloading ${local_filename}" + fn_script_log_error "${fileurl}" + fi + fi + else + fn_print_ok_eol + sleep 0.3 + echo -en "\033[2K\\r" + if [ -f "${lgsmlog}" ]; then + fn_script_log_pass "Downloading ${local_filename}" + fi + + # Make file executable if chmodx is set. + if [ "${chmodx}" == "chmodx" ]; then + chmod +x "${local_filedir}/${local_filename}" + fi + + # Remove trap. + trap - INT + + break + fi + done fi if [ -f "${local_filedir}/${local_filename}" ]; then @@ -187,13 +232,19 @@ fn_fetch_file(){ # forcedl: Optional, force re-download of file even if exists # md5: Optional, set an md5 sum and will compare it against the file. -# Fetches any files from the GitHub repo. +# Fetches files from the Git repo. fn_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - - remote_fileurl="${githuburl}" + if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" local_filedir="${3}" local_filename="${github_file_url_name}" chmodx="${4:-0}" @@ -201,15 +252,22 @@ fn_fetch_file_github(){ forcedl="${6:-0}" md5="${7:-0}" # Passes vars to the file download function. - fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } +# Fetches config files from the Git repo. fn_fetch_config(){ github_file_url_dir="${1}" github_file_url_name="${2}" - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - - remote_fileurl="${githuburl}" + if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" local_filedir="${3}" local_filename="${4}" chmodx="nochmodx" @@ -217,16 +275,22 @@ fn_fetch_config(){ forcedl="noforce" md5="nomd5" # Passes vars to the file download function. - fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } -# Fetches functions. +# Fetches modules from the Git repo during first download. fn_fetch_function(){ github_file_url_dir="lgsm/functions" github_file_url_name="${functionfile}" - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - - remote_fileurl="${githuburl}" + if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" local_filedir="${functionsdir}" local_filename="${github_file_url_name}" chmodx="chmodx" @@ -234,23 +298,31 @@ fn_fetch_function(){ forcedl="noforce" md5="nomd5" # Passes vars to the file download function. - fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } +# Fetches modules from the Git repo during update-lgsm. fn_update_function(){ - exitbypass=1 github_file_url_dir="lgsm/functions" github_file_url_name="${functionfile}" - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - - remote_fileurl="${githuburl}" + if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" local_filedir="${functionsdir}" local_filename="${github_file_url_name}" chmodx="chmodx" run="norun" forcedl="noforce" md5="nomd5" - fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + # Passes vars to the file download function. + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + } # Check that curl is installed diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 9a7f30e98..56060e49e 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -7,6 +7,8 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +modulesversion="v20.2.1" + # Core core_dl.sh(){ @@ -235,6 +237,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +check_version.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + # Compress compress_unreal2_maps.sh(){ @@ -666,6 +673,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +install_modules.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + install_retry.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index a4914bdd9..8a13cc6ea 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -116,6 +116,17 @@ fn_script_log_info(){ fi } +## Feb 28 14:56:58 ut99-server: Monitor: INFO: +fn_script_log_update(){ + if [ -d "${lgsmlogdir}" ]; then + if [ -n "${commandname}" ]; then + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: UPDATE: ${1}" >> "${lgsmlog}" + else + echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: UPDATE: ${1}" >> "${lgsmlog}" + fi + fi +} + # On-Screen - Automated functions ################################## diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 0316e25a3..7f1ea12c1 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Game Server pid if [ "${status}" == "1" ]; then - gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}"| grep "^${selfname}"|awk '{print $2}') + gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}"| grep "^${sessionname}"|awk '{print $2}') fi ### Distro information diff --git a/lgsm/functions/info_stats.sh b/lgsm/functions/info_stats.sh index 9bdee07fd..a99f877af 100644 --- a/lgsm/functions/info_stats.sh +++ b/lgsm/functions/info_stats.sh @@ -23,10 +23,10 @@ fi if [ ! -f "${datadir}/uuid-${selfname}.txt" ]||[ ! -f "${datadir}/uuid-install.txt" ]; then # download dictionary words if [ ! -f "${datadir}/name-left.csv" ]; then - fn_fetch_file_github "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fn_fetch_file_git "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" fi if [ ! -f "${datadir}/name-right.csv" ]; then - fn_fetch_file_github "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fn_fetch_file_git "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" fi # generate instance uuid diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 8851a2e70..ced111afb 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -25,7 +25,7 @@ fn_fetch_default_config(){ mkdir -p "${lgsmdir}/config-default/config-game" githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master" for config in "${array_configs[@]}"; do - fn_fetch_file "${githuburl}/${gamedirname}/${config}" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nomd5" + fn_fetch_file "${githuburl}/${gamedirname}/${config}" "${remote_fileurl_backup}" "GitHub" "Bitbucket" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nomd5" done } diff --git a/lgsm/functions/install_modules.sh b/lgsm/functions/install_modules.sh new file mode 100644 index 000000000..c512b69a3 --- /dev/null +++ b/lgsm/functions/install_modules.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# LinuxGSM install_modules.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Downloads all modules on install + +echo -e "" +echo -e "${lightyellow}Downloading LinuxGSM Modules${default}" +echo -e "=================================" + +fn_fetch_file "https://github.com/GameServerManagers/LinuxGSM/archive/master.tar.gz" "${tmpdir}" "master.tar.gz" "nochmodx" "norun" "noforce" "nomd5" +fn_dl_extract "${tmpdir}" "master.tar.gz" "${tmpdir}" +cp "${tmpdir}/LinuxGSM-master/lgsm/functions"/*.sh "${functionsdir}" +cp "${tmpdir}/LinuxGSM-master/lgsm/functions"/*.py "${functionsdir}" +chmod +x "${functionsdir}"/* +command_update_linuxgsm.sh diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index e45a75c8c..8110e882f 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_factorio_dl(){ - fn_fetch_file "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" + fn_fetch_file "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" "" "" "" "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "" "norun" "noforce" "nomd5" fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" cp -R "${tmpdir}/factorio/"* "${serverfiles}" diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index d74586143..b9db53ec0 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -14,7 +14,7 @@ fn_update_minecraft_dl(){ fi latestmcbuildurl=$(curl -s "${latestmcreleaselink}" | jq -r '.downloads.server.url') - fn_fetch_file "${latestmcbuildurl}" "${tmpdir}" "minecraft_server.${remotebuild}.jar" + fn_fetch_file "${latestmcbuildurl}" "" "" "" "${tmpdir}" "minecraft_server.${remotebuild}.jar" "" "norun" "noforce" "nomd5" echo -e "copying to ${serverfiles}...\c" cp "${tmpdir}/minecraft_server.${remotebuild}.jar" "${serverfiles}/minecraft_server.jar" local exitcode=$? diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 57c452d8a..0fe79ebff 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_mta_dl(){ - fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" + fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "" "norun" "noforce" "nomd5" mkdir "${tmpdir}/multitheftauto_linux_x64" fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${tmpdir}/multitheftauto_linux_x64" echo -e "copying to ${serverfiles}...\c" diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 38fc78aa3..652db5b89 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_mumble_dl(){ - fn_fetch_file "https://github.com/mumble-voip/mumble/releases/download/${remotebuild}/murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" + fn_fetch_file "https://github.com/mumble-voip/mumble/releases/download/${remotebuild}/murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "" "" "" "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "" "norun" "noforce" "nomd5" fn_dl_extract "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" cp -R "${tmpdir}/murmur-static_${mumblearch}-${remotebuild}/"* "${serverfiles}" diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index e50590087..fbabd3d83 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -12,7 +12,7 @@ fn_update_ts3_dl(){ elif [ "${ts3arch}" == "x86" ]; then remotebuildurl=$(curl -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86.mirrors."teamspeak.com"') fi - fn_fetch_file "${remotebuildurl}" "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${remotebuild}.tar.bz2" + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${remotebuild}.tar.bz2" "" "norun" "noforce" "nomd5" fn_dl_extract "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${remotebuild}.tar.bz2" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" cp -R "${tmpdir}/teamspeak3-server_linux_${ts3arch}/"* "${serverfiles}" diff --git a/linuxgsm.sh b/linuxgsm.sh index 983df7271..f4b8c8607 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -26,6 +26,7 @@ gameservername="core" commandname="CORE" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") +sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" @@ -59,46 +60,97 @@ core_functions.sh(){ # Fetches the core functions required before passed off to core_dl.sh. fn_bootstrap_fetch_file(){ remote_fileurl="${1}" - local_filedir="${2}" - local_filename="${3}" - chmodx="${4:-0}" - run="${5:-0}" - forcedl="${6:-0}" - md5="${7:-0}" + remote_fileurl_backup="${2}" + remote_fileurl_name="${3}" + remote_fileurl_backup_name="${4}" + local_filedir="${5}" + local_filename="${6}" + chmodx="${7:-0}" + run="${8:-0}" + forcedl="${9:-0}" + md5="${10:-0}" # Download file if missing or download forced. if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then - if [ ! -d "${local_filedir}" ]; then - mkdir -p "${local_filedir}" + # If backup fileurl exists include it. + if [ -n "${remote_fileurl_backup}" ]; then + # counter set to 0 to allow second try + counter=0 + remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + else + # counter set to 1 to not allow second try + counter=1 + remote_fileurls_array=( remote_fileurl ) fi - # If curl exists download file. - if [ "$(command -v curl 2>/dev/null)" ]; then - # Trap to remove part downloaded files. - echo -en " fetching ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + for remote_fileurl_array in "${remote_fileurls_array[@]}" + do + if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then + fileurl="${remote_fileurl}" + fileurl_name="${remote_fileurl_name}" + elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then + fileurl="${remote_fileurl_backup}" + fileurl_name="${remote_fileurl_backup_name}" + fi + counter=$((counter+1)) + if [ ! -d "${local_filedir}" ]; then + mkdir -p "${local_filedir}" + fi + # Trap will remove part downloaded files if canceled. + trap fn_fetch_trap INT + # Larger files show a progress bar. + + echo -en "fetching ${fileurl_name} ${local_filename}...\c" + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) + local exitcode=$? + + # Download will fail if downloads a html file. + if [ -f "${local_filedir}/${local_filename}" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + rm "${local_filedir:?}/${local_filename:?}" + local exitcode=2 + fi + fi + + # On first try will error. On second try will fail. if [ ${exitcode} -ne 0 ]; then - echo -e "FAIL" - if [ -f "${lgsmlog}" ]; then - echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" - echo -e "${curlcmd}" | tee -a "${lgsmlog}" + if [ ${counter} -ge 2 ]; then + echo -e "FAIL" + if [ -f "${lgsmlog}" ]; then + fn_script_log_fatal "Downloading ${local_filename}" + fn_script_log_fatal "${fileurl}" + fi + core_exit.sh + else + echo -e "ERROR" + if [ -f "${lgsmlog}" ]; then + fn_script_log_error "Downloading ${local_filename}" + fn_script_log_error "${fileurl}" + fi fi - exit 1 else - echo -e "OK" + echo -en "OK" + sleep 0.3 + echo -en "\033[2K\\r" + if [ -f "${lgsmlog}" ]; then + fn_script_log_pass "Downloading ${local_filename}" + fi + + # Make file executable if chmodx is set. + if [ "${chmodx}" == "chmodx" ]; then + chmod +x "${local_filedir}/${local_filename}" + fi + + # Remove trap. + trap - INT + + break fi - else - echo -e "[ FAIL ] Curl is not installed" - exit 1 - fi - # Make file chmodx if chmodx is set. - if [ "${chmodx}" == "chmodx" ]; then - chmod +x "${local_filedir}/${local_filename}" - fi + done fi if [ -f "${local_filedir}/${local_filename}" ]; then - # Run file if run is set. + # Execute file if run is set. if [ "${run}" == "run" ]; then # shellcheck source=/dev/null source "${local_filedir}/${local_filename}" @@ -109,9 +161,15 @@ fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - - remote_fileurl="${githuburl}" + if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" local_filedir="${3}" local_filename="${github_file_url_name}" chmodx="${4:-0}" @@ -119,7 +177,7 @@ fn_bootstrap_fetch_file_github(){ forcedl="${6:-0}" md5="${7:-0}" # Passes vars to the file download function. - fn_bootstrap_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } # Installer menu. @@ -321,10 +379,9 @@ else fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" - echo -en " copying _default.cfg...\c" + echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ $? -ne 0 ]; then echo -e "FAIL" exit 1 else @@ -333,11 +390,10 @@ else else function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") if [ "${function_file_diff}" != "" ]; then - fn_print_warn_nl "_default.cfg has been altered. reloading config." - echo -en " copying _default.cfg...\c" + fn_print_warn_nl "_default.cfg has altered. reloading config." + echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ $? -ne 0 ]; then echo -e "FAIL" exit 1 else diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 7881ad8d6..4bee74eae 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -23,8 +23,10 @@ fi version="v20.2.1" shortname="fctr" gameservername="fctrserver" +commandname="CORE" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") +sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" @@ -43,16 +45,11 @@ userinput="${1}" # Allows for testing not on Travis CI. # if using travis for tests -if [ -n "${TRAVIS}" ]; then - selfname="travis" -# if not using travis for tests -else +if [ -z "${TRAVIS}" ]; then TRAVIS_BRANCH="develop" TRAVIS_BUILD_DIR="${rootdir}" - fi travistest="1" - ## GitHub Branch Select # Allows for the use of different function files # from a different repo and/or branch. @@ -70,46 +67,97 @@ core_functions.sh(){ # Fetches the core functions required before passed off to core_dl.sh. fn_bootstrap_fetch_file(){ remote_fileurl="${1}" - local_filedir="${2}" - local_filename="${3}" - chmodx="${4:-0}" - run="${5:-0}" - forcedl="${6:-0}" - md5="${7:-0}" + remote_fileurl_backup="${2}" + remote_fileurl_name="${3}" + remote_fileurl_backup_name="${4}" + local_filedir="${5}" + local_filename="${6}" + chmodx="${7:-0}" + run="${8:-0}" + forcedl="${9:-0}" + md5="${10:-0}" # Download file if missing or download forced. if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then - if [ ! -d "${local_filedir}" ]; then - mkdir -p "${local_filedir}" + # If backup fileurl exists include it. + if [ -n "${remote_fileurl_backup}" ]; then + # counter set to 0 to allow second try + counter=0 + remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + else + # counter set to 1 to not allow second try + counter=1 + remote_fileurls_array=( remote_fileurl ) fi - # If curl exists download file. - if [ "$(command -v curl 2>/dev/null)" ]; then - # Trap to remove part downloaded files. - echo -en " fetching ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + for remote_fileurl_array in "${remote_fileurls_array[@]}" + do + if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then + fileurl="${remote_fileurl}" + fileurl_name="${remote_fileurl_name}" + elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then + fileurl="${remote_fileurl_backup}" + fileurl_name="${remote_fileurl_backup_name}" + fi + counter=$((counter+1)) + if [ ! -d "${local_filedir}" ]; then + mkdir -p "${local_filedir}" + fi + # Trap will remove part downloaded files if canceled. + trap fn_fetch_trap INT + # Larger files show a progress bar. + + echo -en "fetching ${fileurl_name} ${local_filename}...\c" + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) + local exitcode=$? + # Download will fail if downloads a html file. + if [ -f "${local_filedir}/${local_filename}" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + rm "${local_filedir:?}/${local_filename:?}" + local exitcode=2 + fi + fi + + # On first try will error. On second try will fail. if [ ${exitcode} -ne 0 ]; then - echo -e "FAIL" - if [ -f "${lgsmlog}" ]; then - echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" - echo -e "${curlcmd}" | tee -a "${lgsmlog}" + if [ ${counter} -ge 2 ]; then + echo -e "FAIL" + if [ -f "${lgsmlog}" ]; then + fn_script_log_fatal "Downloading ${local_filename}" + fn_script_log_fatal "${fileurl}" + fi + core_exit.sh + else + echo -e "ERROR" + if [ -f "${lgsmlog}" ]; then + fn_script_log_error "Downloading ${local_filename}" + fn_script_log_error "${fileurl}" + fi fi - exit 1 + else - echo -e "OK" + echo -en "OK" + sleep 0.3 + echo -en "\033[2K\\r" + if [ -f "${lgsmlog}" ]; then + fn_script_log_pass "Downloading ${local_filename}" + fi + + # Make file executable if chmodx is set. + if [ "${chmodx}" == "chmodx" ]; then + chmod +x "${local_filedir}/${local_filename}" + fi + + # Remove trap. + trap - INT + + break fi - else - echo -e "[ FAIL ] Curl is not installed" - exit 1 - fi - # Make file chmodx if chmodx is set. - if [ "${chmodx}" == "chmodx" ]; then - chmod +x "${local_filedir}/${local_filename}" - fi + done fi if [ -f "${local_filedir}/${local_filename}" ]; then - # Run file if run is set. + # Execute file if run is set. if [ "${run}" == "run" ]; then # shellcheck source=/dev/null source "${local_filedir}/${local_filename}" @@ -120,9 +168,15 @@ fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - - remote_fileurl="${githuburl}" + if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" local_filedir="${3}" local_filename="${github_file_url_name}" chmodx="${4:-0}" @@ -130,7 +184,7 @@ fn_bootstrap_fetch_file_github(){ forcedl="${6:-0}" md5="${7:-0}" # Passes vars to the file download function. - fn_bootstrap_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } # Installer menu. @@ -332,7 +386,7 @@ else fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" - echo -en " copying _default.cfg...\c" + echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? if [ ${exitcode} -ne 0 ]; then @@ -345,7 +399,7 @@ else function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") if [ "${function_file_diff}" != "" ]; then fn_print_warn_nl "_default.cfg has been altered. reloading config." - echo -en " copying _default.cfg...\c" + echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? if [ ${exitcode} -ne 0 ]; then diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index dd39ce047..1cc6143cb 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -23,8 +23,10 @@ fi version="v20.2.1" shortname="jc2" gameservername="jc2server" +commandname="CORE" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") +sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" @@ -43,10 +45,7 @@ userinput="${1}" # Allows for testing not on Travis CI. # if using travis for tests -if [ -n "${TRAVIS}" ]; then - selfname="travis" -# if not using travis for tests -else +if [ -z "${TRAVIS}" ]; then TRAVIS_BRANCH="develop" TRAVIS_BUILD_DIR="${rootdir}" fi @@ -69,46 +68,97 @@ core_functions.sh(){ # Fetches the core functions required before passed off to core_dl.sh. fn_bootstrap_fetch_file(){ remote_fileurl="${1}" - local_filedir="${2}" - local_filename="${3}" - chmodx="${4:-0}" - run="${5:-0}" - forcedl="${6:-0}" - md5="${7:-0}" + remote_fileurl_backup="${2}" + remote_fileurl_name="${3}" + remote_fileurl_backup_name="${4}" + local_filedir="${5}" + local_filename="${6}" + chmodx="${7:-0}" + run="${8:-0}" + forcedl="${9:-0}" + md5="${10:-0}" # Download file if missing or download forced. if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then - if [ ! -d "${local_filedir}" ]; then - mkdir -p "${local_filedir}" + # If backup fileurl exists include it. + if [ -n "${remote_fileurl_backup}" ]; then + # counter set to 0 to allow second try + counter=0 + remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + else + # counter set to 1 to not allow second try + counter=1 + remote_fileurls_array=( remote_fileurl ) fi - # If curl exists download file. - if [ "$(command -v curl 2>/dev/null)" ]; then - # Trap to remove part downloaded files. - echo -en " fetching ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + for remote_fileurl_array in "${remote_fileurls_array[@]}" + do + if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then + fileurl="${remote_fileurl}" + fileurl_name="${remote_fileurl_name}" + elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then + fileurl="${remote_fileurl_backup}" + fileurl_name="${remote_fileurl_backup_name}" + fi + counter=$((counter+1)) + if [ ! -d "${local_filedir}" ]; then + mkdir -p "${local_filedir}" + fi + # Trap will remove part downloaded files if canceled. + trap fn_fetch_trap INT + # Larger files show a progress bar. + + echo -en "fetching ${fileurl_name} ${local_filename}...\c" + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) + local exitcode=$? + # Download will fail if downloads a html file. + if [ -f "${local_filedir}/${local_filename}" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + rm "${local_filedir:?}/${local_filename:?}" + local exitcode=2 + fi + fi + + # On first try will error. On second try will fail. if [ ${exitcode} -ne 0 ]; then - echo -e "FAIL" - if [ -f "${lgsmlog}" ]; then - echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" - echo -e "${curlcmd}" | tee -a "${lgsmlog}" + if [ ${counter} -ge 2 ]; then + echo -e "FAIL" + if [ -f "${lgsmlog}" ]; then + fn_script_log_fatal "Downloading ${local_filename}" + fn_script_log_fatal "${fileurl}" + fi + core_exit.sh + else + echo -e "ERROR" + if [ -f "${lgsmlog}" ]; then + fn_script_log_error "Downloading ${local_filename}" + fn_script_log_error "${fileurl}" + fi fi - exit 1 + else - echo -e "OK" + echo -en "OK" + sleep 0.3 + echo -en "\033[2K\\r" + if [ -f "${lgsmlog}" ]; then + fn_script_log_pass "Downloading ${local_filename}" + fi + + # Make file executable if chmodx is set. + if [ "${chmodx}" == "chmodx" ]; then + chmod +x "${local_filedir}/${local_filename}" + fi + + # Remove trap. + trap - INT + + break fi - else - echo -e "[ FAIL ] Curl is not installed" - exit 1 - fi - # Make file chmodx if chmodx is set. - if [ "${chmodx}" == "chmodx" ]; then - chmod +x "${local_filedir}/${local_filename}" - fi + done fi if [ -f "${local_filedir}/${local_filename}" ]; then - # Run file if run is set. + # Execute file if run is set. if [ "${run}" == "run" ]; then # shellcheck source=/dev/null source "${local_filedir}/${local_filename}" @@ -119,9 +169,15 @@ fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - - remote_fileurl="${githuburl}" + if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" local_filedir="${3}" local_filename="${github_file_url_name}" chmodx="${4:-0}" @@ -129,7 +185,7 @@ fn_bootstrap_fetch_file_github(){ forcedl="${6:-0}" md5="${7:-0}" # Passes vars to the file download function. - fn_bootstrap_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } # Installer menu. @@ -331,7 +387,7 @@ else fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" - echo -en " copying _default.cfg...\c" + echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? if [ ${exitcode} -ne 0 ]; then @@ -344,7 +400,7 @@ else function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") if [ "${function_file_diff}" != "" ]; then fn_print_warn_nl "_default.cfg has been altered. reloading config." - echo -en " copying _default.cfg...\c" + echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? if [ ${exitcode} -ne 0 ]; then diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index a8f16a22a..2138b8faf 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -23,8 +23,10 @@ fi version="v20.2.1" shortname="mc" gameservername="mcserver" +commandname="CORE" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") +sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" @@ -43,13 +45,9 @@ userinput="${1}" # Allows for testing not on Travis CI. # if using travis for tests -if [ -n "${TRAVIS}" ]; then - selfname="travis" -# if not using travis for tests -else +if [ -z "${TRAVIS}" ]; then TRAVIS_BRANCH="develop" TRAVIS_BUILD_DIR="${rootdir}" - fi travistest="1" @@ -70,46 +68,97 @@ core_functions.sh(){ # Fetches the core functions required before passed off to core_dl.sh. fn_bootstrap_fetch_file(){ remote_fileurl="${1}" - local_filedir="${2}" - local_filename="${3}" - chmodx="${4:-0}" - run="${5:-0}" - forcedl="${6:-0}" - md5="${7:-0}" + remote_fileurl_backup="${2}" + remote_fileurl_name="${3}" + remote_fileurl_backup_name="${4}" + local_filedir="${5}" + local_filename="${6}" + chmodx="${7:-0}" + run="${8:-0}" + forcedl="${9:-0}" + md5="${10:-0}" # Download file if missing or download forced. if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then - if [ ! -d "${local_filedir}" ]; then - mkdir -p "${local_filedir}" + # If backup fileurl exists include it. + if [ -n "${remote_fileurl_backup}" ]; then + # counter set to 0 to allow second try + counter=0 + remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + else + # counter set to 1 to not allow second try + counter=1 + remote_fileurls_array=( remote_fileurl ) fi - # If curl exists download file. - if [ "$(command -v curl 2>/dev/null)" ]; then - # Trap to remove part downloaded files. - echo -en " fetching ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + for remote_fileurl_array in "${remote_fileurls_array[@]}" + do + if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then + fileurl="${remote_fileurl}" + fileurl_name="${remote_fileurl_name}" + elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then + fileurl="${remote_fileurl_backup}" + fileurl_name="${remote_fileurl_backup_name}" + fi + counter=$((counter+1)) + if [ ! -d "${local_filedir}" ]; then + mkdir -p "${local_filedir}" + fi + # Trap will remove part downloaded files if canceled. + trap fn_fetch_trap INT + # Larger files show a progress bar. + + echo -en "fetching ${fileurl_name} ${local_filename}...\c" + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) + local exitcode=$? + # Download will fail if downloads a html file. + if [ -f "${local_filedir}/${local_filename}" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + rm "${local_filedir:?}/${local_filename:?}" + local exitcode=2 + fi + fi + + # On first try will error. On second try will fail. if [ ${exitcode} -ne 0 ]; then - echo -e "FAIL" - if [ -f "${lgsmlog}" ]; then - echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" - echo -e "${curlcmd}" | tee -a "${lgsmlog}" + if [ ${counter} -ge 2 ]; then + echo -e "FAIL" + if [ -f "${lgsmlog}" ]; then + fn_script_log_fatal "Downloading ${local_filename}" + fn_script_log_fatal "${fileurl}" + fi + core_exit.sh + else + echo -e "ERROR" + if [ -f "${lgsmlog}" ]; then + fn_script_log_error "Downloading ${local_filename}" + fn_script_log_error "${fileurl}" + fi fi - exit 1 + else - echo -e "OK" + echo -en "OK" + sleep 0.3 + echo -en "\033[2K\\r" + if [ -f "${lgsmlog}" ]; then + fn_script_log_pass "Downloading ${local_filename}" + fi + + # Make file executable if chmodx is set. + if [ "${chmodx}" == "chmodx" ]; then + chmod +x "${local_filedir}/${local_filename}" + fi + + # Remove trap. + trap - INT + + break fi - else - echo -e "[ FAIL ] Curl is not installed" - exit 1 - fi - # Make file chmodx if chmodx is set. - if [ "${chmodx}" == "chmodx" ]; then - chmod +x "${local_filedir}/${local_filename}" - fi + done fi if [ -f "${local_filedir}/${local_filename}" ]; then - # Run file if run is set. + # Execute file if run is set. if [ "${run}" == "run" ]; then # shellcheck source=/dev/null source "${local_filedir}/${local_filename}" @@ -120,9 +169,15 @@ fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - - remote_fileurl="${githuburl}" + if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" local_filedir="${3}" local_filename="${github_file_url_name}" chmodx="${4:-0}" @@ -130,7 +185,7 @@ fn_bootstrap_fetch_file_github(){ forcedl="${6:-0}" md5="${7:-0}" # Passes vars to the file download function. - fn_bootstrap_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } # Installer menu. @@ -332,7 +387,7 @@ else fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" - echo -en " copying _default.cfg...\c" + echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? if [ ${exitcode} -ne 0 ]; then @@ -345,7 +400,7 @@ else function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") if [ "${function_file_diff}" != "" ]; then fn_print_warn_nl "_default.cfg has been altered. reloading config." - echo -en " copying _default.cfg...\c" + echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? if [ ${exitcode} -ne 0 ]; then diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index af50e3805..6f393ad84 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -23,8 +23,10 @@ fi version="v20.2.1" shortname="ts3" gameservername="ts3server" +commandname="CORE" rootdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")") +sessionname=$(echo "${selfname}" | cut -f1 -d".") lgsmdir="${rootdir}/lgsm" logdir="${rootdir}/log" lgsmlogdir="${logdir}/lgsm" @@ -43,13 +45,9 @@ userinput="${1}" # Allows for testing not on Travis CI. # if using travis for tests -if [ -n "${TRAVIS}" ]; then - selfname="travis" -# if not using travis for tests -else +if [ -z "${TRAVIS}" ]; then TRAVIS_BRANCH="develop" TRAVIS_BUILD_DIR="${rootdir}" - fi travistest="1" @@ -70,46 +68,97 @@ core_functions.sh(){ # Fetches the core functions required before passed off to core_dl.sh. fn_bootstrap_fetch_file(){ remote_fileurl="${1}" - local_filedir="${2}" - local_filename="${3}" - chmodx="${4:-0}" - run="${5:-0}" - forcedl="${6:-0}" - md5="${7:-0}" + remote_fileurl_backup="${2}" + remote_fileurl_name="${3}" + remote_fileurl_backup_name="${4}" + local_filedir="${5}" + local_filename="${6}" + chmodx="${7:-0}" + run="${8:-0}" + forcedl="${9:-0}" + md5="${10:-0}" # Download file if missing or download forced. if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then - if [ ! -d "${local_filedir}" ]; then - mkdir -p "${local_filedir}" + # If backup fileurl exists include it. + if [ -n "${remote_fileurl_backup}" ]; then + # counter set to 0 to allow second try + counter=0 + remote_fileurls_array=( remote_fileurl remote_fileurl_backup ) + else + # counter set to 1 to not allow second try + counter=1 + remote_fileurls_array=( remote_fileurl ) fi - # If curl exists download file. - if [ "$(command -v curl 2>/dev/null)" ]; then - # Trap to remove part downloaded files. - echo -en " fetching ${local_filename}...\c" - curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) + for remote_fileurl_array in "${remote_fileurls_array[@]}" + do + if [ "${remote_fileurl_array}" == "remote_fileurl" ]; then + fileurl="${remote_fileurl}" + fileurl_name="${remote_fileurl_name}" + elif [ "${remote_fileurl_array}" == "remote_fileurl_backup" ]; then + fileurl="${remote_fileurl_backup}" + fileurl_name="${remote_fileurl_backup_name}" + fi + counter=$((counter+1)) + if [ ! -d "${local_filedir}" ]; then + mkdir -p "${local_filedir}" + fi + # Trap will remove part downloaded files if canceled. + trap fn_fetch_trap INT + # Larger files show a progress bar. + + echo -en "fetching ${fileurl_name} ${local_filename}...\c" + curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) + local exitcode=$? + # Download will fail if downloads a html file. + if [ -f "${local_filedir}/${local_filename}" ]; then + if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE" )" ]; then + rm "${local_filedir:?}/${local_filename:?}" + local exitcode=2 + fi + fi + + # On first try will error. On second try will fail. if [ ${exitcode} -ne 0 ]; then - echo -e "FAIL" - if [ -f "${lgsmlog}" ]; then - echo -e "${remote_fileurl}" | tee -a "${lgsmlog}" - echo -e "${curlcmd}" | tee -a "${lgsmlog}" + if [ ${counter} -ge 2 ]; then + echo -e "FAIL" + if [ -f "${lgsmlog}" ]; then + fn_script_log_fatal "Downloading ${local_filename}" + fn_script_log_fatal "${fileurl}" + fi + core_exit.sh + else + echo -e "ERROR" + if [ -f "${lgsmlog}" ]; then + fn_script_log_error "Downloading ${local_filename}" + fn_script_log_error "${fileurl}" + fi fi - exit 1 + else - echo -e "OK" + echo -en "OK" + sleep 0.3 + echo -en "\033[2K\\r" + if [ -f "${lgsmlog}" ]; then + fn_script_log_pass "Downloading ${local_filename}" + fi + + # Make file executable if chmodx is set. + if [ "${chmodx}" == "chmodx" ]; then + chmod +x "${local_filedir}/${local_filename}" + fi + + # Remove trap. + trap - INT + + break fi - else - echo -e "[ FAIL ] Curl is not installed" - exit 1 - fi - # Make file chmodx if chmodx is set. - if [ "${chmodx}" == "chmodx" ]; then - chmod +x "${local_filedir}/${local_filename}" - fi + done fi if [ -f "${local_filedir}/${local_filename}" ]; then - # Run file if run is set. + # Execute file if run is set. if [ "${run}" == "run" ]; then # shellcheck source=/dev/null source "${local_filedir}/${local_filename}" @@ -120,9 +169,15 @@ fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" - - remote_fileurl="${githuburl}" + if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" + else + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + fi + remote_fileurl_name="GitHub" + remote_fileurl_backup_name="Bitbucket" local_filedir="${3}" local_filename="${github_file_url_name}" chmodx="${4:-0}" @@ -130,7 +185,7 @@ fn_bootstrap_fetch_file_github(){ forcedl="${6:-0}" md5="${7:-0}" # Passes vars to the file download function. - fn_bootstrap_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } # Installer menu. @@ -332,7 +387,7 @@ else fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" - echo -en " copying _default.cfg...\c" + echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? if [ ${exitcode} -ne 0 ]; then @@ -345,7 +400,7 @@ else function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg") if [ "${function_file_diff}" != "" ]; then fn_print_warn_nl "_default.cfg has been altered. reloading config." - echo -en " copying _default.cfg...\c" + echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? if [ ${exitcode} -ne 0 ]; then From 7a6b9f3294feea549052e25a19c7bf6f1e0f5fc9 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 19 May 2020 10:56:27 +0200 Subject: [PATCH 30/96] fix(mods): sdtd oxide url parsing from github with jq (#2883) --- lgsm/functions/mods_list.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index e47f3f909..6485faa45 100644 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -37,7 +37,7 @@ get5url="${get5downloadurl}" # Oxide oxiderustlatestlink="https://umod.org/games/rust/download/develop" # fix for linux build 06.09.2019 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") -oxidesdtdlatestlink=$(curl -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | grep browser_download_url | cut -d '"' -f 4) +oxidesdtdlatestlink=$(curl -sL https://api.github.com/repos/OxideMod/Oxide.SevenDaysToDie/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url' ) # Define mods information (required) From b4c6f561ebbba5bcc22ebc616852da2b96a1b467 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 19 May 2020 11:27:58 +0100 Subject: [PATCH 31/96] remove dev code --- lgsm/functions/command_update_linuxgsm.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 1fe1e39fa..05397692f 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -100,11 +100,7 @@ fi # Ignoring server specific vars. echo -en "checking ${selfname}...\c" fn_script_log_info "Checking ${selfname}" -echo "TMPDIR: ${tmpdir}" -echo "ROOTDIR: ${rootdir}" -echo "SELFNAME: ${selfname}" script_diff=$(diff <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${tmpdir}/linuxgsm.sh") <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${rootdir}/${selfname}")) -echo "==========================================" if [ "${script_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_update "Checking ${selfname}" From 6fcd8d78f4b9d42109b6a524df32d4eb6a8c1059 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 20 May 2020 09:18:35 +0200 Subject: [PATCH 32/96] feat(newserver): Chivalry: Medieval Warfare (#2880) Co-authored-by: Daniel Gibbs --- .../config-lgsm/cmwserver/_default.cfg | 175 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/command_dev_query_raw.sh | 4 +- lgsm/functions/command_monitor.sh | 2 +- lgsm/functions/command_update_linuxgsm.sh | 2 +- lgsm/functions/core_functions.sh | 5 + lgsm/functions/fix.sh | 4 +- lgsm/functions/fix_cmw.sh | 33 ++++ lgsm/functions/fix_hw.sh | 8 +- lgsm/functions/fix_steamcmd.sh | 12 +- lgsm/functions/info_config.sh | 20 ++ lgsm/functions/info_messages.sh | 14 ++ lgsm/functions/info_stats.sh | 4 +- lgsm/functions/query_gamedig.sh | 16 +- 14 files changed, 273 insertions(+), 27 deletions(-) create mode 100644 lgsm/config-default/config-lgsm/cmwserver/_default.cfg create mode 100644 lgsm/functions/fix_cmw.sh diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg new file mode 100644 index 000000000..155ef0c17 --- /dev/null +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -0,0 +1,175 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES 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. + +#### Game Server Settings #### + +## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="7777" +queryport="7779" +defaultmap="AOCTD-Frigid_p" + + +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ + +parms="${defaultmap}?steamsockets -multihome=${ip} -Port=${port} -QueryPort=${queryport} -seekfreeloadingserver -configsubdir=${gamelogdir} -log=${gamelog}" + +} + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## 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://termbin.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" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# 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" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="220070" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Game Server Details +# Do not edit +gamename="Chivalry: Medieval Warfare" +engine="unreal3" +glibc="2.15" + +#### Directories #### +# Edit with care +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${systemdir}/Binaries/Linux" +executable="./UDKGameServer-Linux" +servercfgdir="${systemdir}/UDKGame/Config/${selfname}" +servercfg="PCServer-UDKGame.ini" +servercfgdefault="PCServer-UDKGame.ini" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index f3b13a7fc..ac703ffe9 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -14,6 +14,7 @@ bs,bsserver,Blade Symphony bt,btserver,Barotrauma bt1944,bt1944server,Battalion 1944 cc,ccserver,Codename CURE +cmw,cmwserver,Chivalry: Medieval Warfare cod,codserver,Call of Duty cod2,cod2server,Call of Duty 2 cod4,cod4server,Call of Duty 4 diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index b96036c2f..22ed232ec 100644 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -35,7 +35,7 @@ fi query_gamedig.sh echo -e "${gamedigcmd}" echo"" -echo -e "${gamedigraw}" | jq +echo "${gamedigraw}" | jq echo -e "" echo -e "gsquery Raw Output" @@ -44,7 +44,7 @@ echo -e "" echo -e "./query_gsquery.py -a \"${ip}\" -p \"${queryport}\" -e \"${querytype}\"" echo -e "" if [ ! -f "${functionsdir}/query_gsquery.py" ]; then - fn_fetch_file_git "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" fi "${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${querytype}" diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index a66c362b4..4b621c0d5 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -84,7 +84,7 @@ fn_monitor_check_queryport(){ fn_query_gsquery(){ if [ ! -f "${functionsdir}/query_gsquery.py" ]; then - fn_fetch_file_git "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" fi "${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1 querystatus="$?" diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 05397692f..9e778c9ee 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -194,7 +194,7 @@ if [ -n "${functionsdir}" ]; then fi fi -fn_print_ok "Updating functions" +fn_print_ok_nl "Updating functions" fn_script_log_pass "Updating functions" core_exit.sh diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 56060e49e..a5e1cce44 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -320,6 +320,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +fix_cmw.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fix_csgo.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 74523ee5c..a42f0e51d 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -42,6 +42,8 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then fix_ark.sh elif [ "${shortname}" == "csgo" ]; then fix_csgo.sh + elif [ "${shortname}" == "cmw" ]; then + fix_cmw.sh elif [ "${shortname}" == "dst" ]; then fix_dst.sh elif [ "${shortname}" == "ges" ]; then @@ -89,7 +91,7 @@ fi # Fixes that are run on install only. if [ "${commandname}" == "INSTALL" ]; then - if [ "${shortname}" == "av" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then + if [ "${shortname}" == "av" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then echo -e "" echo -e "Applying Post-Install Fixes" echo -e "=================================" diff --git a/lgsm/functions/fix_cmw.sh b/lgsm/functions/fix_cmw.sh new file mode 100644 index 000000000..7dc502be6 --- /dev/null +++ b/lgsm/functions/fix_cmw.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# LinuxGSM fix_cmw.sh function +# Author: Christian Birk +# Website: https://linuxgsm.com +# Description: Resolves the issue of the not starting server on linux + +fixname="steam_appid.txt" + +if [ ! -f "${executabledir}/steam_appid.txt" ]; then + fn_fix_msg_start + echo 219640 > "${executabledir}/steam_appid.txt" + fn_fix_msg_end +fi + + +if [ ! -f "${executabledir}/lib/steamclient.so" ]; then + fixname="steamclient.so" + fn_fix_msg_start + if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + cp "${steamcmddir}/linux32/steamclient.so" "${executabledir}/lib/steamclient.so" + elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + cp "${steamcmddir}/linux32/steamclient.so" "${executabledir}/lib/steamclient.so" + fi + fn_fix_msg_end +fi + +if [ ! -f "${servercfgfullpath}" ]; then + fn_fix_msg_start + fixname="copy config" + mkdir "${servercfgdir}" + cp "${systemdir}/UDKGame/Config/"*.ini "${servercfgdir}" + fn_fix_msg_end +fi diff --git a/lgsm/functions/fix_hw.sh b/lgsm/functions/fix_hw.sh index 954a834a0..6230f7b46 100644 --- a/lgsm/functions/fix_hw.sh +++ b/lgsm/functions/fix_hw.sh @@ -12,9 +12,9 @@ if [ "${shortname}" == "hw" ]; then fixname="steamclient.so x86" fn_fix_msg_start if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then - cp -v "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}" + cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}" elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then - cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}" + cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}" else : fi @@ -24,9 +24,9 @@ if [ "${shortname}" == "hw" ]; then fixname="steamclient.so x86_64" fn_fix_msg_start if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then - cp -v "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" + cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then - cp -v "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" + cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" else : fi diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index be5197b9d..0a2f774f1 100644 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -12,11 +12,9 @@ if [ ! -f "${HOME}/.steam/sdk64/steamclient.so" ]; then fn_fix_msg_start mkdir -pv "${HOME}/.steam/sdk64" >> "${lgsmlog}" if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then - cp -v "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${HOME}/.steam/sdk64/steamclient.so" >> "${lgsmlog}" + cp "${steamcmddir}/linux64/steamclient.so" "${HOME}/.steam/sdk64/steamclient.so" >> "${lgsmlog}" elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then - cp -v "${steamcmddir}/linux64/steamclient.so" "${HOME}/.steam/sdk64/steamclient.so" >> "${lgsmlog}" - else - $?=2 + cp "${steamcmddir}/linux64/steamclient.so" "${HOME}/.steam/sdk64/steamclient.so" >> "${lgsmlog}" fi fn_fix_msg_end fi @@ -27,11 +25,9 @@ if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then fn_fix_msg_start mkdir -pv "${HOME}/.steam/sdk32" >> "${lgsmlog}" if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then - cp -v "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}" + cp "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}" elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then - cp -v "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}" - else - $?=2 + cp "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}" fi fn_fix_msg_end fi diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 282559deb..743c657e0 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -199,6 +199,23 @@ fn_info_config_bf1942(){ fi } +fn_info_config_chivalry(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + adminpassword="${unavailable}" + else + servername=$(egrep "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//') + adminpassword=$(egrep "^AdminPassword" "${servercfgfullpath}" | sed 's/^AdminPassword=//') + + # Not Set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + port=${port:-"0"} + fi +} + fn_info_config_cod(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1455,6 +1472,9 @@ elif [ "${shortname}" == "bt1944" ]; then # Battlefield: 1942 elif [ "${shortname}" == "bf1942" ]; then fn_info_config_bf1942 +# Chivalry: Medieval Warfare +elif [ "${shortname}" == "cmw" ]; then + fn_info_config_chivalry # Call of Duty elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]; then fn_info_config_cod diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 6d46d1b22..e5a8ec364 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -698,6 +698,18 @@ fn_info_message_coduo(){ } | column -s $'\t' -t } +fn_info_message_chivalry(){ + fn_info_message_password_strip + echo -e "netstat -atunp | grep UDKGame" + echo -e "" + { + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + echo -e "> RCON\tINBOUND\t27960\ttcp" + } | column -s $'\t' -t +} + fn_info_message_cod2(){ echo -e "netstat -atunp | grep cod2_lnxded" echo -e "" @@ -1390,6 +1402,8 @@ fn_info_message_select_engine(){ fn_info_message_barotrauma elif [ "${shortname}" == "bt1944" ]; then fn_info_message_battalion1944 + elif [ "${shortname}" == "cmw" ]; then + fn_info_message_chivalry elif [ "${shortname}" == "cod" ]; then fn_info_message_cod elif [ "${shortname}" == "coduo" ]; then diff --git a/lgsm/functions/info_stats.sh b/lgsm/functions/info_stats.sh index a99f877af..9bdee07fd 100644 --- a/lgsm/functions/info_stats.sh +++ b/lgsm/functions/info_stats.sh @@ -23,10 +23,10 @@ fi if [ ! -f "${datadir}/uuid-${selfname}.txt" ]||[ ! -f "${datadir}/uuid-install.txt" ]; then # download dictionary words if [ ! -f "${datadir}/name-left.csv" ]; then - fn_fetch_file_git "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fn_fetch_file_github "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" fi if [ ! -f "${datadir}/name-right.csv" ]; then - fn_fetch_file_git "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fn_fetch_file_github "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" fi # generate instance uuid diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index fca71c57c..285cf0805 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -16,23 +16,23 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; # checks if query is working null = pass. gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${ip}\" --query_port \"${queryport}\"|jq") gamedigraw=$(gamedig --type "${querytype}" --host "${ip}" --query_port "${queryport}") - querystatus=$(echo -e "${gamedigraw}" | jq '.error|length') + querystatus=$(echo "${gamedigraw}" | jq '.error|length') if [ "${querystatus}" != "null" ]; then gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${ip}\" --port \"${queryport}\"|jq") gamedigraw=$(gamedig --type "${querytype}" --host "${ip}" --port "${queryport}") - querystatus=$(echo -e "${gamedigraw}" | jq '.error|length') + querystatus=$(echo "${gamedigraw}" | jq '.error|length') fi # server name. - gdname=$(echo -e "${gamedigraw}" | jq -re '.name') + gdname=$(echo "${gamedigraw}" | jq -re '.name') if [ "${gdname}" == "null" ]; then unset gdname fi # numplayers. - gdplayers=$(echo -e "${gamedigraw}" | jq -re '.raw.vanilla.raw.players.online') + gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.vanilla.raw.players.online') if [ "${gdplayers}" == "null" ]; then unset gdplayers elif [ "${gdplayers}" == "[]" ]; then @@ -40,7 +40,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi # maxplayers. - gdmaxplayers=$(echo -e "${gamedigraw}" | jq -re '.maxplayers') + gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers') if [ "${gdmaxplayers}" == "null" ]; then unset maxplayers elif [ "${gdmaxplayers}" == "[]" ]; then @@ -48,19 +48,19 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi # current map. - gdmap=$(echo -e "${gamedigraw}" | jq -re '.map') + gdmap=$(echo "${gamedigraw}" | jq -re '.map') if [ "${gdmap}" == "null" ]; then unset gdmap fi # current gamemode. - gdgamemode=$(echo -e "${gamedigraw}" | jq -re '.raw.rules.GameMode_s') + gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s') if [ "${gdgamemode}" == "null" ]; then unset gdgamemode fi # numbots. - gdbots=$(echo -e "${gamedigraw}" | jq -re '.raw.numbots') + gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots') if [ "${gdbots}" == "null" ]||[ "${gdbots}" == "0" ]; then unset gdbots fi From f40ad7dd6ae7d7257e3e6b6ef27a608fcd7c390a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 20 May 2020 12:45:58 +0100 Subject: [PATCH 33/96] fix(update): ensure that tmpdir is cleared when update is found (#2890) --- lgsm/functions/update_factorio.sh | 5 +++++ lgsm/functions/update_minecraft.sh | 5 +++++ lgsm/functions/update_minecraft_bedrock.sh | 7 ++++++- lgsm/functions/update_mta.sh | 6 +++++- lgsm/functions/update_mumble.sh | 4 ++++ lgsm/functions/update_steamcmd.sh | 4 ++-- lgsm/functions/update_ts3.sh | 5 +++++ 7 files changed, 32 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 8110e882f..f7436d58d 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -20,6 +20,7 @@ fn_update_factorio_dl(){ fn_print_fail_eol_nl fn_script_log_fatal "Copying to ${serverfiles}" core_exit.sh + fn_clear_tmp fi } @@ -78,6 +79,7 @@ fn_update_factorio_compare(){ if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi + echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild} ${factorioarch}" fn_script_log_info "Remote build: ${remotebuild} ${factorioarch}" @@ -118,6 +120,7 @@ fn_update_factorio_compare(){ if [ -v "${branch}" ]; then echo -e "* Branch: ${branch}" fi + echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild} ${factorioarch}" fn_script_log_info "Remote build: ${remotebuild} ${factorioarch}" @@ -160,9 +163,11 @@ if [ "${installer}" == "1" ]; then fn_update_factorio_remotebuild fn_update_factorio_dl else + fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" fn_update_factorio_localbuild fn_update_factorio_remotebuild fn_update_factorio_compare fi +core_exit.sh diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index b9db53ec0..8a81e0ad6 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -26,6 +26,7 @@ fn_update_minecraft_dl(){ else fn_print_fail_eol_nl fn_script_log_fatal "Copying to ${serverfiles}" + fn_clear_tmp core_exit.sh fi } @@ -137,6 +138,7 @@ fn_update_minecraft_compare(){ echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -en "\n" if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi @@ -177,6 +179,7 @@ fn_update_minecraft_compare(){ if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi + echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuild}" @@ -208,9 +211,11 @@ if [ "${installer}" == "1" ]; then fn_update_minecraft_remotebuild fn_update_minecraft_dl else + fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" fn_update_minecraft_localbuild fn_update_minecraft_remotebuild fn_update_minecraft_compare fi +core_exit.sh diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index 564fb5c7b..e439adcb5 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -24,6 +24,7 @@ fn_update_minecraft_dl(){ else fn_print_fail_eol_nl fn_script_log_fatal "Extracting to ${serverfiles}" + fn_clear_tmp core_exit.sh fi } @@ -66,7 +67,7 @@ fn_update_minecraft_localbuild(){ fn_script_log_error "Missing local build info" fn_script_log_error "Set localbuild to 0" else - fn_print_ok "Checking local build: ${remotelocation}: checking local build" + fn_print_ok "Checking local build: ${remotelocation}" fn_script_log_pass "Checking local build" fi } @@ -106,6 +107,7 @@ fn_update_minecraft_compare(){ echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuild}" @@ -140,6 +142,7 @@ fn_update_minecraft_compare(){ echo -e "No update available" echo -e "* Local build: ${green}${localbuild}${default}" echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuild}" @@ -168,9 +171,11 @@ if [ "${installer}" == "1" ]; then fn_update_minecraft_remotebuild fn_update_minecraft_dl else + fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" fn_update_minecraft_localbuild fn_update_minecraft_remotebuild fn_update_minecraft_compare fi +core_exit.sh diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 0fe79ebff..c8fad55ea 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -13,11 +13,11 @@ fn_update_mta_dl(){ echo -e "copying to ${serverfiles}...\c" cp -R "${tmpdir}/multitheftauto_linux_x64/multitheftauto_linux_x64/"* "${serverfiles}" local exitcode=$? + fn_clear_tmp if [ "${exitcode}" == "0" ]; then fn_print_ok_eol_nl fn_script_log_pass "Copying to ${serverfiles}" chmod u+x "${serverfiles}/mta-server64" - fn_clear_tmp else fn_print_fail_eol_nl fn_script_log_fatal "Copying to ${serverfiles}" @@ -138,6 +138,7 @@ fn_update_mta_compare(){ echo -e "Update ${mtaupdatestatus}:" echo -e "* Local build: ${red}${localbuild}${default}" echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuild}" @@ -172,6 +173,7 @@ fn_update_mta_compare(){ echo -e "No update available" echo -e "* Local build: ${green}${localbuild}${default}" echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuild}" @@ -200,9 +202,11 @@ if [ "${installer}" == "1" ]; then fn_update_mta_remotebuild fn_update_mta_dl else + fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" fn_update_mta_localbuild fn_update_mta_remotebuild fn_update_mta_compare fi +core_exit.sh diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 652db5b89..9fe9e2596 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -19,6 +19,7 @@ fn_update_mumble_dl(){ else fn_print_fail_eol_nl fn_script_log_fatal "Copying to ${serverfiles}" + fn_clear_tmp core_exit.sh fi } @@ -74,6 +75,7 @@ fn_update_mumble_compare(){ echo -e "Update available" echo -e "* Local build: ${red}${localbuild} ${mumblearch}${default}" echo -e "* Remote build: ${green}${remotebuild} ${mumblearch}${default}" + echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild} ${mumblearch}" fn_script_log_info "Remote build: ${remotebuild} ${mumblearch}" @@ -108,6 +110,7 @@ fn_update_mumble_compare(){ echo -e "No update available" echo -e "* Local build: ${green}${localbuild} ${mumblearch}${default}" echo -e "* Remote build: ${green}${remotebuild} ${mumblearch}${default}" + echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild} ${mumblearch}" fn_script_log_info "Remote build: ${remotebuild} ${mumblearch}" @@ -145,3 +148,4 @@ else fn_update_mumble_remotebuild fn_update_mumble_compare fi +core_exit.sh diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 5000b5e3d..b22569d1a 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -130,11 +130,10 @@ fn_update_steamcmd_compare(){ command_stop.sh exitbypass=1 fn_update_steamcmd_dl - date +%s > "${lockdir}/lastupdate.lock" exitbypass=1 command_start.sh fi - + date +%s > "${lockdir}/lastupdate.lock" alert="update" alert.sh else @@ -247,3 +246,4 @@ else fn_update_steamcmd_remotebuild fn_update_steamcmd_compare fi +core_exit.sh diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index fbabd3d83..87c8a86da 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -24,6 +24,7 @@ fn_update_ts3_dl(){ else fn_print_fail_eol_nl fn_script_log_fatal "Copying to ${serverfiles}" + fn_clear_tmp core_exit.sh fi } @@ -161,6 +162,7 @@ fn_update_ts3_compare(){ exitbypass=1 command_start.sh fi + date +%s > "${lockdir}/lastupdate.lock" alert="update" alert.sh else @@ -169,6 +171,7 @@ fn_update_ts3_compare(){ echo -e "No update available" echo -e "* Local build: ${green}${localbuild}${default}" echo -e "* Remote build: ${green}${remotebuild}${default}" + echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuild}" @@ -209,9 +212,11 @@ if [ "${installer}" == "1" ]; then fn_update_ts3_remotebuild fn_update_ts3_dl else + fn_print_dots "Checking for update" fn_print_dots "Checking for update: ${remotelocation}" fn_script_log_info "Checking for update: ${remotelocation}" fn_update_ts3_localbuild fn_update_ts3_remotebuild fn_update_ts3_compare fi +core_exit.sh From 2b9df619e235195e484f5fe192746d394ced1157 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 20 May 2020 13:03:02 +0100 Subject: [PATCH 34/96] fix(details): correct if for bf1942 details (#2891) --- lgsm/functions/info_messages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index e5a8ec364..063914497 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1490,7 +1490,7 @@ fn_info_message_select_engine(){ fn_info_message_mta elif [ "${shortname}" == "mumble" ]; then fn_info_message_mumble - elif [ "${engine}" == "bf1942" ]; then + elif [ "${shortname}" == "bf1942" ]; then fn_info_message_bf1942 elif [ "${shortname}" == "rtcw" ]; then fn_info_message_rtcw From 13b3acbb4518871bb9b3bfa2c0742b733e525e41 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 20 May 2020 13:31:01 +0100 Subject: [PATCH 35/96] release v20.3.0 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index a5e1cce44..ae1b860a7 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v20.2.1" +modulesversion="v20.3.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index f4b8c8607..eaa2b31b7 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.2.1" +version="v20.3.0" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 4bee74eae..50f2a1b15 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.2.1" +version="v20.3.0" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 1cc6143cb..831b3a549 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.2.1" +version="v20.2.0" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 2138b8faf..8c3c6c267 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.2.1" +version="v20.3.0" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 6f393ad84..6b398364b 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.2.1" +version="v20.3.0" shortname="ts3" gameservername="ts3server" commandname="CORE" From 57c7156d32e2ddfe2322a895e0440faccba3694a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 20 May 2020 14:25:36 +0100 Subject: [PATCH 36/96] release v30.3.0 --- tests/tests_jc2server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 831b3a549..61793bca0 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.2.0" +version="v20.3.0" shortname="jc2" gameservername="jc2server" commandname="CORE" From 95ce894f10b1d84c88c48ee6504eed4644978653 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 20 May 2020 15:39:35 +0100 Subject: [PATCH 37/96] fix resolving update not running on install (#2893) --- lgsm/functions/update_factorio.sh | 5 ++++- lgsm/functions/update_minecraft.sh | 5 ++++- lgsm/functions/update_minecraft_bedrock.sh | 5 ++++- lgsm/functions/update_mta.sh | 5 ++++- lgsm/functions/update_mumble.sh | 5 ++++- lgsm/functions/update_steamcmd.sh | 5 ++++- lgsm/functions/update_ts3.sh | 5 ++++- 7 files changed, 28 insertions(+), 7 deletions(-) diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index f7436d58d..7d12c0f58 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -170,4 +170,7 @@ else fn_update_factorio_remotebuild fn_update_factorio_compare fi -core_exit.sh + +if [ "${commandname}" != "INSTALL" ]; then + core_exit.sh +fi diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 8a81e0ad6..8741db01d 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -218,4 +218,7 @@ else fn_update_minecraft_remotebuild fn_update_minecraft_compare fi -core_exit.sh + +if [ "${commandname}" != "INSTALL" ]; then + core_exit.sh +fi diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index e439adcb5..b560f3672 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -178,4 +178,7 @@ else fn_update_minecraft_remotebuild fn_update_minecraft_compare fi -core_exit.sh + +if [ "${commandname}" != "INSTALL" ]; then + core_exit.sh +fi diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index c8fad55ea..c37c5ba81 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -209,4 +209,7 @@ else fn_update_mta_remotebuild fn_update_mta_compare fi -core_exit.sh + +if [ "${commandname}" != "INSTALL" ]; then + core_exit.sh +fi diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 9fe9e2596..00fbade5e 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -148,4 +148,7 @@ else fn_update_mumble_remotebuild fn_update_mumble_compare fi -core_exit.sh + +if [ "${commandname}" != "INSTALL" ]; then + core_exit.sh +fi diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index b22569d1a..e7d018d19 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -246,4 +246,7 @@ else fn_update_steamcmd_remotebuild fn_update_steamcmd_compare fi -core_exit.sh + +if [ "${commandname}" != "INSTALL" ]; then + core_exit.sh +fi diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index 87c8a86da..ec921b3f0 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -219,4 +219,7 @@ else fn_update_ts3_remotebuild fn_update_ts3_compare fi -core_exit.sh + +if [ "${commandname}" != "INSTALL" ]; then + core_exit.sh +fi From f05eab26330150891ae2b412c5baf2970744e9bb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 20 May 2020 17:42:04 +0100 Subject: [PATCH 38/96] feat(avorion): remove avgalaxy variable and replace with selfname --- lgsm/config-default/config-lgsm/avserver/_default.cfg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index 4b53d68d2..f4f430e16 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -11,14 +11,13 @@ port="27000" # https://steamidfinder.com adminsteamid="" -avgalaxy="avgalaxy" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ if [ ! -z "${adminsteamid}" ]; then admincmd="--admin ${adminsteamid}" fi -parms="--galaxy-name ${avgalaxy} --ip ${ip} --datapath ${avdatapath} ${admincmd}" +parms="--galaxy-name ${selfname} --ip ${ip} --datapath ${avdatapath} ${admincmd}" } #### LinuxGSM Settings #### @@ -146,7 +145,7 @@ glibc="2.15" ## Game Server Directories avdatapath="${serverfiles}/galaxy" -avgalaxypath="${avdatapath}/${avgalaxy}" +avgalaxypath="${avdatapath}/${selfname}" systemdir="${serverfiles}" executabledir="${systemdir}" executable="./server.sh" From 2e548b4fed25aa8a496df6ff41c9dc11e4748eec Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 00:06:01 +0100 Subject: [PATCH 39/96] Delete .all-contributorsrc --- .all-contributorsrc | 119 -------------------------------------------- 1 file changed, 119 deletions(-) delete mode 100644 .all-contributorsrc diff --git a/.all-contributorsrc b/.all-contributorsrc deleted file mode 100644 index 9e4a36a51..000000000 --- a/.all-contributorsrc +++ /dev/null @@ -1,119 +0,0 @@ -{ - "files": [ - "README.md" - ], - "imageSize": 100, - "commit": false, - "contributors": [ - { - "login": "dgibbs64", - "name": "Daniel Gibbs", - "avatar_url": "https://avatars2.githubusercontent.com/u/4478206?v=4", - "profile": "https://danielgibbs.co.uk", - "contributions": [ - "bug", - "code", - "ideas", - "question", - "review", - "content", - "doc", - "infra" - ] - }, - { - "login": "Frisasky", - "name": "Frisasky", - "avatar_url": "https://avatars2.githubusercontent.com/u/26865851?v=4", - "profile": "https://github.com/Frisasky", - "contributions": [ - "question", - "bug", - "code" - ] - }, - { - "login": "kennyLtv", - "name": "Kenny Lindelof", - "avatar_url": "https://avatars2.githubusercontent.com/u/6133325?v=4", - "profile": "https://kennyl.design", - "contributions": [ - "question" - ] - }, - { - "login": "Scarsz", - "name": "Austin Shapiro", - "avatar_url": "https://avatars1.githubusercontent.com/u/7691988?v=4", - "profile": "https://scarsz.me", - "contributions": [ - "bug", - "code" - ] - }, - { - "login": "marvinlehmann", - "name": "Marvin Lehmann", - "avatar_url": "https://avatars2.githubusercontent.com/u/4151266?v=4", - "profile": "https://github.com/marvinlehmann", - "contributions": [ - "bug", - "code" - ] - }, - { - "login": "Bourne-ID", - "name": "Bourne-ID", - "avatar_url": "https://avatars1.githubusercontent.com/u/7073616?v=4", - "profile": "https://github.com/Bourne-ID", - "contributions": [ - "review", - "content", - "doc", - "infra", - "review" - ] - }, - { - "login": "cedarlug", - "name": "CedarLUG", - "avatar_url": "https://avatars2.githubusercontent.com/u/19336442?v=4", - "profile": "http://cedarlug.org", - "contributions": [ - "bug", - "code", - "ideas", - "question", - "review" - ] - }, - { - "login": "UltimateByte", - "name": "UltimateByte", - "avatar_url": "https://avatars3.githubusercontent.com/u/8805941?v=4", - "profile": "https://www.terageek.org | https://www.haisoft.fr", - "contributions": [ - "bug", - "code", - "doc", - "ideas", - "review" - ] - }, - { - "login": "borzaka", - "name": "Attila", - "avatar_url": "https://avatars0.githubusercontent.com/u/1230402?v=4", - "profile": "https://github.com/borzaka", - "contributions": [ - "code", - "bug" - ] - } - ], - "contributorsPerLine": 7, - "projectName": "LinuxGSM", - "projectOwner": "GameServerManagers", - "repoType": "github", - "repoHost": "https://github.com" -} From d9b26ff0cac178151df081a12c958b00c254d228 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 00:06:57 +0100 Subject: [PATCH 40/96] Update git-sync.yml --- .github/workflows/git-sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index addbba773..31946495f 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -6,7 +6,7 @@ on: branches: - master - 'develop' - - 'feature/update-lgsm' + jobs: repo-sync: runs-on: ubuntu-latest From d9086379651dd5a82fe2f36a6698a4e4eb1944d4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 12:14:45 +0100 Subject: [PATCH 41/96] fix(update-lgsm): will force check_version.sh to download this fix will help older versions of LinuxGSM transition to v20.3.0 and above by forcing check_version.sh to download if missing --- lgsm/functions/core_dl.sh | 7 ++++++- lgsm/functions/core_legacy.sh | 13 +++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 8e2888add..ea0f6d8cc 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -236,7 +236,12 @@ fn_fetch_file(){ fn_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + + if [ "${legacycheckversionfix}" == "1" ]; then + # For legacy versions - code can be removed at a future date + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + elif [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index 520287ec8..4e1418fd7 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -6,6 +6,19 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +# This is to help the transition to v20.3.0 and above +if [ ! -f "${functionsdir}/check_version.sh" ]; then + legacy_versions_array=( v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0 ) + for legacy_version in "${legacy_versions_array[@]}" + do + if [ "${version}" == "${legacy_version}" ]; then + legacycheckversionfix=1 + github_file_url_dir="lgsm/functions" + fn_fetch_file_github "${github_file_url_dir}" "check_version.sh" "${functionsdir}" "nochmodx" "norun" "noforce" "nomd5" + fi + done +fi + if [ -z "${serverfiles}" ]; then legacymode=1 serverfiles="${filesdir}" From efdc0d75395503e055a477a17d641099f4d2e640 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 13:32:24 +0100 Subject: [PATCH 42/96] will now check linuxgsm.sh first --- lgsm/functions/command_update_linuxgsm.sh | 98 +++++++++++------------ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 9e778c9ee..e13438f19 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -32,6 +32,55 @@ else fn_print_ok_nl "Selecting repo: ${remotereponame}" fi +# Check gameserver.sh +# Compare gameserver.sh against linuxgsm.sh in the tmp dir. +# Ignoring server specific vars. +echo -en "checking ${selfname}...\c" +fn_script_log_info "Checking ${selfname}" +script_diff=$(diff <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${tmpdir}/linuxgsm.sh") <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${rootdir}/${selfname}")) +if [ "${script_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${selfname}" + echo -en "backup ${selfname}...\c" + fn_script_log_info "Backup ${selfname}" + if [ ! -d "${backupdir}/script" ]; then + mkdir -p "${backupdir}/script" + fi + cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" + if [ $? -ne 0 ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Backup ${selfname}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "Backup ${selfname}" + echo -e "backup location ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" + fn_script_log_pass "Backup location ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" + fi + + echo -en "copying ${selfname}...\c" + fn_script_log_info "copying ${selfname}" + cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" + sed -i "s+shortname=\"core\"+shortname=\"${shortname}\"+g" "${rootdir}/${selfname}" + sed -i "s+gameservername=\"core\"+gameservername=\"${gameservername}\"+g" "${rootdir}/${selfname}" + sed -i "s+gamename=\"core\"+gamename=\"${gamename}\"+g" "${rootdir}/${selfname}" + sed -i "s+githubuser=\"GameServerManagers\"+githubuser=\"${githubuser}\"+g" "${rootdir}/${selfname}" + sed -i "s+githubrepo=\"LinuxGSM\"+githubrepo=\"${githubrepo}\"+g" "${rootdir}/${selfname}" + sed -i "s+githubbranch=\"master\"+githubbranch=\"${githubbranch}\"+g" "${rootdir}/${selfname}" + + if [ $? != "0" ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "copying ${selfname}" + core_exit.sh + else + fn_print_ok_eol_nl + fn_script_log_pass "copying ${selfname}" + fi +else + fn_print_ok_eol_nl + fn_script_log_info "Checking ${selfname}" +fi + # Check _default.cfg. echo -en "checking ${remotereponame} config _default.cfg...\c" fn_script_log_info "Checking ${remotereponame} config _default.cfg" @@ -95,55 +144,6 @@ else fn_script_log_pass "Checking ${remotereponame} linuxgsm.sh" fi -# Check gameserver.sh -# Compare gameserver.sh against linuxgsm.sh in the tmp dir. -# Ignoring server specific vars. -echo -en "checking ${selfname}...\c" -fn_script_log_info "Checking ${selfname}" -script_diff=$(diff <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${tmpdir}/linuxgsm.sh") <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${rootdir}/${selfname}")) -if [ "${script_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_update "Checking ${selfname}" - echo -en "backup ${selfname}...\c" - fn_script_log_info "Backup ${selfname}" - if [ ! -d "${backupdir}/script" ]; then - mkdir -p "${backupdir}/script" - fi - cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" - if [ $? -ne 0 ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Backup ${selfname}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "Backup ${selfname}" - echo -e "backup location ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" - fn_script_log_pass "Backup location ${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" - fi - - echo -en "copying ${selfname}...\c" - fn_script_log_info "copying ${selfname}" - cp "${tmpdir}/linuxgsm.sh" "${rootdir}/${selfname}" - sed -i "s+shortname=\"core\"+shortname=\"${shortname}\"+g" "${rootdir}/${selfname}" - sed -i "s+gameservername=\"core\"+gameservername=\"${gameservername}\"+g" "${rootdir}/${selfname}" - sed -i "s+gamename=\"core\"+gamename=\"${gamename}\"+g" "${rootdir}/${selfname}" - sed -i "s+githubuser=\"GameServerManagers\"+githubuser=\"${githubuser}\"+g" "${rootdir}/${selfname}" - sed -i "s+githubrepo=\"LinuxGSM\"+githubrepo=\"${githubrepo}\"+g" "${rootdir}/${selfname}" - sed -i "s+githubbranch=\"master\"+githubbranch=\"${githubbranch}\"+g" "${rootdir}/${selfname}" - - if [ $? != "0" ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "copying ${selfname}" - core_exit.sh - else - fn_print_ok_eol_nl - fn_script_log_pass "copying ${selfname}" - fi -else - fn_print_ok_eol_nl - fn_script_log_info "Checking ${selfname}" -fi - # Check and update modules. if [ -n "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then From 707a546078a1b1a9e549766eb58162d2c68de845 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 13:33:47 +0100 Subject: [PATCH 44/96] Auto stash before cherry pick of "versions before v20.3.0 will not use version tags" --- lgsm/functions/check_ip.sh | 5 +---- lgsm/functions/check_steamcmd.sh | 12 ++---------- lgsm/functions/core_dl.sh | 2 +- lgsm/functions/core_legacy.sh | 19 +++++++------------ 4 files changed, 11 insertions(+), 27 deletions(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index 0e027953c..7f007b94b 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -44,10 +44,7 @@ if [ "${travistest}" != "1" ]; then echo -en "\n" echo -en "Set ip=\"0.0.0.0\" to one of the following:\n" fn_script_log_fatal "Multiple IP addresses found." - if [ "${legacymode}" == "1" ]; then - fn_script_log_fatal "Specify the IP you want to bind within the ${selfname} script." - else - fn_script_log_fatal "Specify the IP you want to bind within: ${configdirserver}." + fn_script_log_fatal "Specify the IP you want to bind within: ${configdirserver}." fi fi echo -en "${getip}\n" diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index b42d581df..aa4140bbe 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -31,18 +31,10 @@ fn_install_steamcmd(){ fn_check_steamcmd_user(){ # Checks if steamuser is setup. if [ "${steamuser}" == "username" ]; then - if [ "${legacymode}" == "1" ]; then - fn_print_fail_nl "Steam login not set. Update steamuser in ${selfname}" - else - fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" - fi + fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" echo -e " * Change steamuser=\"username\" to a valid steam login." if [ -d "${lgsmlogdir}" ]; then - if [ "${legacymode}" == "1" ]; then - fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}" - else - fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" - fi + fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" fi core_exit.sh fi diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index ea0f6d8cc..47b8e6cd9 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -237,7 +237,7 @@ fn_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - if [ "${legacycheckversionfix}" == "1" ]; then + if [ "${legacymode}" == "1" ]; then # For legacy versions - code can be removed at a future date remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index 4e1418fd7..3450d5842 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -7,20 +7,15 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # This is to help the transition to v20.3.0 and above -if [ ! -f "${functionsdir}/check_version.sh" ]; then - legacy_versions_array=( v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0 ) - for legacy_version in "${legacy_versions_array[@]}" - do - if [ "${version}" == "${legacy_version}" ]; then - legacycheckversionfix=1 - github_file_url_dir="lgsm/functions" - fn_fetch_file_github "${github_file_url_dir}" "check_version.sh" "${functionsdir}" "nochmodx" "norun" "noforce" "nomd5" - fi - done -fi +legacy_versions_array=( v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0 ) +for legacy_version in "${legacy_versions_array[@]}" +do + if [ "${version}" == "${legacy_version}" ]; then + legacymode=1 + fi +done if [ -z "${serverfiles}" ]; then - legacymode=1 serverfiles="${filesdir}" fi From 05f3d2d3b4156f39cdb90befadd3c747eee42b74 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 13:40:15 +0100 Subject: [PATCH 45/96] messages --- lgsm/functions/command_monitor.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 4b621c0d5..3a333a578 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -71,11 +71,9 @@ fn_monitor_check_queryport(){ fn_script_log_info "Checking port: CHECKING" if [ -n "${rconenabled}" ]&&[ "${rconenabled}" != "true" ]&&[ ${shortname} == "av" ]; then fn_print_warn "Checking port: Unable to query as rconport, rcon not enabled: " - fn_print_warn_eol_nl fn_script_log_warn "Checking port: Unable to query rconport, rcon not enabled: WARN" else fn_print_error "Checking port: Unable to query queryport is not set: " - fn_print_error_eol_nl fn_script_log_error "Checking port: Unable to query as queryport is not set: ERROR" fi core_exit.sh From 51a4c75ea58937471e3c569e68199f30e28d2b7b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 13:42:22 +0100 Subject: [PATCH 46/96] linuxgsm.sh check first --- lgsm/functions/command_update_linuxgsm.sh | 60 +++++++++++------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index e13438f19..c32bf321f 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -32,6 +32,36 @@ else fn_print_ok_nl "Selecting repo: ${remotereponame}" fi +# Check linuxsm.sh +echo -en "checking ${remotereponame} linuxgsm.sh...\c" +if [ "${remotereponame}" == "GitHub" ]; then + curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1>/dev/null +else + curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1>/dev/null +fi +if [ $? != "0" ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Checking ${remotereponame} linuxgsm.sh" + fn_script_log_fatal "Curl returned error: $?" + core_exit.sh +fi + +if [ "${remotereponame}" == "GitHub" ]; then + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) +else + tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh")) +fi + +if [ "${tmp_script_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${remotereponame} linuxgsm.sh" + rm -f "${tmpdir:?}/linuxgsm.sh" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" +else + fn_print_ok_eol_nl + fn_script_log_pass "Checking ${remotereponame} linuxgsm.sh" +fi + # Check gameserver.sh # Compare gameserver.sh against linuxgsm.sh in the tmp dir. # Ignoring server specific vars. @@ -114,36 +144,6 @@ else fn_script_log_pass "Checking ${remotereponame} config _default.cfg" fi -# Check linuxsm.sh -echo -en "checking ${remotereponame} linuxgsm.sh...\c" -if [ "${remotereponame}" == "GitHub" ]; then - curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1>/dev/null -else - curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1>/dev/null -fi -if [ $? != "0" ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Checking ${remotereponame} linuxgsm.sh" - fn_script_log_fatal "Curl returned error: $?" - core_exit.sh -fi - -if [ "${remotereponame}" == "GitHub" ]; then - tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh")) -else - tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh")) -fi - -if [ "${tmp_script_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} linuxgsm.sh" - rm -f "${tmpdir:?}/linuxgsm.sh" - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" -else - fn_print_ok_eol_nl - fn_script_log_pass "Checking ${remotereponame} linuxgsm.sh" -fi - # Check and update modules. if [ -n "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then From a752554290413ced40be788c91b52c151f9bef42 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 13:45:18 +0100 Subject: [PATCH 47/96] space --- lgsm/functions/core_dl.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 47b8e6cd9..89ee784db 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -236,7 +236,6 @@ fn_fetch_file(){ fn_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - if [ "${legacymode}" == "1" ]; then # For legacy versions - code can be removed at a future date remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" From 0fa77403cde67e74c1b84444c77dc333d6f38ad8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 13:56:41 +0100 Subject: [PATCH 48/96] stray fi --- lgsm/functions/check_ip.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index 7f007b94b..d8c4f3ed5 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -45,7 +45,6 @@ if [ "${travistest}" != "1" ]; then echo -en "Set ip=\"0.0.0.0\" to one of the following:\n" fn_script_log_fatal "Multiple IP addresses found." fn_script_log_fatal "Specify the IP you want to bind within: ${configdirserver}." - fi fi echo -en "${getip}\n" echo -en "\n" From 81e23c729e1f0667eaeb689406085b49580d5ef4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 17:21:37 +0100 Subject: [PATCH 49/96] fix(mods): resolve broken downloader for mods (#2899) --- lgsm/functions/mods_core.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 8108e0d0e..da2576207 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -18,7 +18,7 @@ modsinstalledlistfullpath="${modsdir}/${modsinstalledlist}" # Download management. fn_mod_install_files(){ - fn_fetch_file "${modurl}" "${modstmpdir}" "${modfilename}" + fn_fetch_file "${modurl}" "" "" "" "${modstmpdir}" "${modfilename}" # Check if variable is valid checking if file has been downloaded and exists. if [ ! -f "${modstmpdir}/${modfilename}" ]; then fn_print_failure "An issue occurred downloading ${modprettyname}" From 04bb8485b805fad4c87dd2e33b21dfee7a38b8d3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 17:22:04 +0100 Subject: [PATCH 50/96] fix(update): fix update on start not working (#2901) * add space to grep to get accurate session name * move messages to get proper output --- lgsm/functions/command_start.sh | 7 +++++-- lgsm/functions/info_distro.sh | 2 +- lgsm/functions/update_factorio.sh | 4 ---- lgsm/functions/update_minecraft.sh | 4 ---- lgsm/functions/update_minecraft_bedrock.sh | 4 ---- lgsm/functions/update_mta.sh | 4 ---- lgsm/functions/update_mumble.sh | 4 ---- lgsm/functions/update_steamcmd.sh | 4 ---- lgsm/functions/update_ts3.sh | 4 ---- 9 files changed, 6 insertions(+), 31 deletions(-) diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 7ba90159d..d0487e5d4 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -165,13 +165,12 @@ fn_start_tmux(){ echo -en "\n" } - check.sh -fn_print_dots "${servername}" # Is the server already started. # $status comes from check_status.sh, which is run by check.sh for this command if [ "${status}" != "0" ]; then + fn_print_dots "${servername}" fn_print_info_nl "${servername} is already running" fn_script_log_error "${servername} is already running" if [ -z "${exitbypass}" ]; then @@ -189,8 +188,12 @@ if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateon exitbypass=1 unset updateonstart command_update.sh + commandname="START" + commandaction="Starting" fi +fn_print_dots "${servername}" + if [ "${shortname}" == "ts3" ]; then fn_start_teamspeak3 else diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 7f1ea12c1..1e2a519f4 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" ### Game Server pid if [ "${status}" == "1" ]; then - gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}"| grep "^${sessionname}"|awk '{print $2}') + gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $2}') fi ### Distro information diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 7d12c0f58..5ff67c448 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -170,7 +170,3 @@ else fn_update_factorio_remotebuild fn_update_factorio_compare fi - -if [ "${commandname}" != "INSTALL" ]; then - core_exit.sh -fi diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 8741db01d..556097bd6 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -218,7 +218,3 @@ else fn_update_minecraft_remotebuild fn_update_minecraft_compare fi - -if [ "${commandname}" != "INSTALL" ]; then - core_exit.sh -fi diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index b560f3672..8f408bf29 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -178,7 +178,3 @@ else fn_update_minecraft_remotebuild fn_update_minecraft_compare fi - -if [ "${commandname}" != "INSTALL" ]; then - core_exit.sh -fi diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index c37c5ba81..5aaecc122 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -209,7 +209,3 @@ else fn_update_mta_remotebuild fn_update_mta_compare fi - -if [ "${commandname}" != "INSTALL" ]; then - core_exit.sh -fi diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 00fbade5e..ee6a2b0ad 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -148,7 +148,3 @@ else fn_update_mumble_remotebuild fn_update_mumble_compare fi - -if [ "${commandname}" != "INSTALL" ]; then - core_exit.sh -fi diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index e7d018d19..8a089c7f7 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -246,7 +246,3 @@ else fn_update_steamcmd_remotebuild fn_update_steamcmd_compare fi - -if [ "${commandname}" != "INSTALL" ]; then - core_exit.sh -fi diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index ec921b3f0..a5cc0dd60 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -219,7 +219,3 @@ else fn_update_ts3_remotebuild fn_update_ts3_compare fi - -if [ "${commandname}" != "INSTALL" ]; then - core_exit.sh -fi From eb3807464099752cca05ed43d91470dd192a9e14 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 17:22:23 +0100 Subject: [PATCH 51/96] fix(update-lgsm): versions before v20.3.0 will not use version tags (#2900) --- lgsm/functions/check_ip.sh | 6 +-- lgsm/functions/check_steamcmd.sh | 12 +---- lgsm/functions/command_monitor.sh | 2 - lgsm/functions/command_update_linuxgsm.sh | 66 +++++++++++------------ lgsm/functions/core_dl.sh | 6 ++- lgsm/functions/core_legacy.sh | 10 +++- 6 files changed, 50 insertions(+), 52 deletions(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index 0e027953c..d8c4f3ed5 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -44,11 +44,7 @@ if [ "${travistest}" != "1" ]; then echo -en "\n" echo -en "Set ip=\"0.0.0.0\" to one of the following:\n" fn_script_log_fatal "Multiple IP addresses found." - if [ "${legacymode}" == "1" ]; then - fn_script_log_fatal "Specify the IP you want to bind within the ${selfname} script." - else - fn_script_log_fatal "Specify the IP you want to bind within: ${configdirserver}." - fi + fn_script_log_fatal "Specify the IP you want to bind within: ${configdirserver}." fi echo -en "${getip}\n" echo -en "\n" diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index b42d581df..aa4140bbe 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -31,18 +31,10 @@ fn_install_steamcmd(){ fn_check_steamcmd_user(){ # Checks if steamuser is setup. if [ "${steamuser}" == "username" ]; then - if [ "${legacymode}" == "1" ]; then - fn_print_fail_nl "Steam login not set. Update steamuser in ${selfname}" - else - fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" - fi + fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" echo -e " * Change steamuser=\"username\" to a valid steam login." if [ -d "${lgsmlogdir}" ]; then - if [ "${legacymode}" == "1" ]; then - fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}" - else - fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" - fi + fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" fi core_exit.sh fi diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 4b621c0d5..3a333a578 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -71,11 +71,9 @@ fn_monitor_check_queryport(){ fn_script_log_info "Checking port: CHECKING" if [ -n "${rconenabled}" ]&&[ "${rconenabled}" != "true" ]&&[ ${shortname} == "av" ]; then fn_print_warn "Checking port: Unable to query as rconport, rcon not enabled: " - fn_print_warn_eol_nl fn_script_log_warn "Checking port: Unable to query rconport, rcon not enabled: WARN" else fn_print_error "Checking port: Unable to query queryport is not set: " - fn_print_error_eol_nl fn_script_log_error "Checking port: Unable to query as queryport is not set: ERROR" fi core_exit.sh diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 9e778c9ee..c32bf321f 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -32,39 +32,6 @@ else fn_print_ok_nl "Selecting repo: ${remotereponame}" fi -# Check _default.cfg. -echo -en "checking ${remotereponame} config _default.cfg...\c" -fn_script_log_info "Checking ${remotereponame} config _default.cfg" -if [ "${remotereponame}" == "GitHub" ]; then - curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null -else - curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null -fi -if [ $? != "0" ]; then - fn_print_fail_eol_nl - fn_script_log_fatal "Checking ${remotereponame} config _default.cfg" - fn_script_log_fatal "Curl returned error: $?" - core_exit.sh -fi - -if [ "${remotereponame}" == "GitHub" ]; then - config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) -else - config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) -fi - -if [ "${config_file_diff}" != "" ]; then - fn_print_update_eol_nl - fn_script_log_update "Checking ${remotereponame} config _default.cfg" - rm -f "${configdirdefault:?}/config-lgsm/${gameservername:?}/_default.cfg" - fn_fetch_file_github "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "nochmodx" "norun" "noforce" "nomd5" - alert="config" - alert.sh -else - fn_print_ok_eol_nl - fn_script_log_pass "Checking ${remotereponame} config _default.cfg" -fi - # Check linuxsm.sh echo -en "checking ${remotereponame} linuxgsm.sh...\c" if [ "${remotereponame}" == "GitHub" ]; then @@ -144,6 +111,39 @@ else fn_script_log_info "Checking ${selfname}" fi +# Check _default.cfg. +echo -en "checking ${remotereponame} config _default.cfg...\c" +fn_script_log_info "Checking ${remotereponame} config _default.cfg" +if [ "${remotereponame}" == "GitHub" ]; then + curl -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null +else + curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1>/dev/null +fi +if [ $? != "0" ]; then + fn_print_fail_eol_nl + fn_script_log_fatal "Checking ${remotereponame} config _default.cfg" + fn_script_log_fatal "Curl returned error: $?" + core_exit.sh +fi + +if [ "${remotereponame}" == "GitHub" ]; then + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) +else + config_file_diff=$(diff "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" <(curl -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg")) +fi + +if [ "${config_file_diff}" != "" ]; then + fn_print_update_eol_nl + fn_script_log_update "Checking ${remotereponame} config _default.cfg" + rm -f "${configdirdefault:?}/config-lgsm/${gameservername:?}/_default.cfg" + fn_fetch_file_github "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "nochmodx" "norun" "noforce" "nomd5" + alert="config" + alert.sh +else + fn_print_ok_eol_nl + fn_script_log_pass "Checking ${remotereponame} config _default.cfg" +fi + # Check and update modules. if [ -n "${functionsdir}" ]; then if [ -d "${functionsdir}" ]; then diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 8e2888add..89ee784db 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -236,7 +236,11 @@ fn_fetch_file(){ fn_fetch_file_github(){ github_file_url_dir="${1}" github_file_url_name="${2}" - if [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then + if [ "${legacymode}" == "1" ]; then + # For legacy versions - code can be removed at a future date + remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" + elif [ "${githubbranch}" == "master" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}" remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}" else diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index 520287ec8..3450d5842 100644 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -6,8 +6,16 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +# This is to help the transition to v20.3.0 and above +legacy_versions_array=( v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0 ) +for legacy_version in "${legacy_versions_array[@]}" +do + if [ "${version}" == "${legacy_version}" ]; then + legacymode=1 + fi +done + if [ -z "${serverfiles}" ]; then - legacymode=1 serverfiles="${filesdir}" fi From 498cb6714603fc5c1efd5d729fefd4ef46cdc0ea Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 21 May 2020 17:42:23 +0100 Subject: [PATCH 52/96] release v20.3.1 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index ae1b860a7..8eb248388 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v20.3.0" +modulesversion="v20.3.1" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index eaa2b31b7..3edbb0948 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.0" +version="v20.3.1" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 50f2a1b15..9d56e36ef 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.0" +version="v20.3.1" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 61793bca0..9ab94578b 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.0" +version="v20.3.1" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 8c3c6c267..6e651b2ac 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.0" +version="v20.3.1" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 6b398364b..003813835 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.0" +version="v20.3.1" shortname="ts3" gameservername="ts3server" commandname="CORE" From 755907a7a64040dcd6240aaa7834789a253295d5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 22 May 2020 19:03:50 +0100 Subject: [PATCH 53/96] 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 ee85cb782..357dfdf6e 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -9,4 +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: ["https://www.paypal.me/dgibbs64", paypal.me/dgibbs64] # Replace with a single custom sponsorship URL +custom: [paypal.me/dgibbs64] # Replace with a single custom sponsorship URL From 3ae3d89bf745bb21bac637a452cc96fef5991100 Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 24 May 2020 15:26:45 +0200 Subject: [PATCH 54/96] fix(download): fix some files not downloading (#2904) --- lgsm/functions/command_install_resources_mta.sh | 2 +- lgsm/functions/fix_mta.sh | 2 +- lgsm/functions/install_server_files.sh | 2 +- lgsm/functions/update_minecraft_bedrock.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 0a9ac7806..053982e0b 100644 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -12,7 +12,7 @@ fn_install_resources(){ echo -e "" echo -e "Installing Default Resources" echo -e "=================================" - fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nomd5" + fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "" "" "" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nomd5" fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}" echo -e "Default Resources Installed." } diff --git a/lgsm/functions/fix_mta.sh b/lgsm/functions/fix_mta.sh index d57e04f3a..549101a68 100644 --- a/lgsm/functions/fix_mta.sh +++ b/lgsm/functions/fix_mta.sh @@ -11,6 +11,6 @@ if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then fixname="libmysqlclient16" fn_fix_msg_start_nl fn_sleep_time - fn_fetch_file "https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16" "${lgsmdir}/lib" "libmysqlclient.so.16" "chmodx" "norun" "noforce" "6c188e0f8fb5d7a29f4bc413b9fed6c2" + fn_fetch_file "https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16" "" "" "" "${lgsmdir}/lib" "libmysqlclient.so.16" "chmodx" "norun" "noforce" "6c188e0f8fb5d7a29f4bc413b9fed6c2" fn_fix_msg_end fi diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index a3ddd435a..f6c48c3dd 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -62,7 +62,7 @@ fn_install_server_files(){ elif [ "${shortname}" == "zmr" ]; then remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b5_2.tar.xz"; local_filedir="${tmpdir}"; local_filename="zombie_master_reborn_b5_2.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="4b9b9832e863d03981a40c26065792a6" fi - fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_fetch_file "${remote_fileurl}" "" "" "" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" } diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index 8f408bf29..61cad6854 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_minecraft_dl(){ latestmcbuildurl=$(curl -s "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip') - fn_fetch_file "${latestmcbuildurl}" "${tmpdir}" "bedrock_server.${remotebuild}.zip" + fn_fetch_file "${latestmcbuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip" echo -e "Extracting to ${serverfiles}...\c" if [ "${installer}" == "1" ]; then unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "server.properties" -d "${serverfiles}" From ff4d037da3a46b0ba07baa0b0d043ebdb1d6583d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 24 May 2020 14:33:20 +0100 Subject: [PATCH 55/96] remove install_modules --- lgsm/functions/core_functions.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 8eb248388..9555a4fa3 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -678,11 +678,6 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } -install_modules.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function -} - install_retry.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function From 58956fab3cba11f7827c35ac946c05d0e92c18ff Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 24 May 2020 14:37:41 +0100 Subject: [PATCH 56/96] release v20.3.2 release v30.3.2 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 9555a4fa3..4e87d494b 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v20.3.1" +modulesversion="v20.3.2" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 3edbb0948..83e8f4b86 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.1" +version="v20.3.2" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 9d56e36ef..a828ba750 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.1" +version="v20.3.2" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 9ab94578b..d23eaf48c 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.1" +version="v20.3.2" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 6e651b2ac..f2962c035 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.1" +version="v20.3.2" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 003813835..5de30cda4 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.1" +version="v20.3.2" shortname="ts3" gameservername="ts3server" commandname="CORE" From b52dc9af8eb1d912e33826f9c776126ca6808c09 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 29 May 2020 18:45:08 +0100 Subject: [PATCH 57/96] fix(ut3server): correct md5sum for ut3server download --- .github/workflows/git-sync.yml | 2 +- lgsm/functions/install_server_files.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index 31946495f..9fc886b4e 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -3,7 +3,7 @@ name: Backup Repo # This will allow LinuxGSM to use Bitbucket as and alternative download if github fails. on: push: - branches: + branches: - master - 'develop' diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index f6c48c3dd..9593401ce 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -52,7 +52,7 @@ fn_install_server_files(){ elif [ "${shortname}" == "ut" ]; then remote_fileurl="http://linuxgsm.download/UnrealTournament/UnrealTournament-Server-XAN-3525360-Linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="UnrealTournament-Server-XAN-3525360-Linux.tar.xz"; chmodx="noexecute" run="norun"; force="noforce"; md5="41dd92015713a78211eaccf503b72393" elif [ "${shortname}" == "ut3" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament3/UT3-linux-server-2.1.tar.xz"; local_filedir="${tmpdir}"; local_filename="UT3-linux-server-2.1.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="6b92b083c7ab416399e2183a22fda1df" + remote_fileurl="http://linuxgsm.download/UnrealTournament3/UT3-linux-server-2.1.tar.xz"; local_filedir="${tmpdir}"; local_filename="UT3-linux-server-2.1.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="8876cca61e3f83ea08db25208bde6ac6" elif [ "${shortname}" == "vs" ]; then remote_fileurl="http://linuxgsm.download/VampireSlayer/vs_l-6.0_full.tar.xz"; local_filedir="${tmpdir}"; local_filename="vs_l-6.0_full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="b322f79e0abd31847493c52acf802667" elif [ "${shortname}" == "wet" ]; then From 363c5ab1f341815c4129d21c2034ff9a499ba5fe Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 29 May 2020 18:46:27 +0100 Subject: [PATCH 58/96] release v20.3.3 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 4e87d494b..4b0387194 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v20.3.2" +modulesversion="v20.3.3" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 83e8f4b86..aececaed8 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.2" +version="v20.3.3" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index a828ba750..da71c2b5a 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.2" +version="v20.3.3" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index d23eaf48c..b52cf1f1b 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.2" +version="v20.3.3" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index f2962c035..8d7bab6b6 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.2" +version="v20.3.3" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 5de30cda4..fb4f889bf 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.2" +version="v20.3.3" shortname="ts3" gameservername="ts3server" commandname="CORE" From 56b87ef23177a695c3e71a1971fca75818c6ae77 Mon Sep 17 00:00:00 2001 From: ttocszed00 Date: Thu, 18 Jun 2020 04:53:20 +0900 Subject: [PATCH 59/96] fix(details): fix if typo in starbound details (#2929) --- lgsm/functions/info_messages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 063914497..eb0ed43cf 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1462,7 +1462,7 @@ fn_info_message_select_engine(){ fn_info_message_sof2 elif [ "${shortname}" == "sol" ]; then fn_info_message_soldat - elif [ "${shortname}" == "st" ]; then + elif [ "${shortname}" == "sb" ]; then fn_info_message_starbound elif [ "${shortname}" == "sbots" ]; then fn_info_message_sbots From 8ebeac900cf436ac6b43e66b630cdf9524a09bbb Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 17 Jun 2020 21:54:49 +0200 Subject: [PATCH 60/96] fix(av): fix post install for Avorion #2925 (#2928) --- lgsm/functions/fix_av.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/fix_av.sh b/lgsm/functions/fix_av.sh index bf9ff2b4b..3edf7862b 100644 --- a/lgsm/functions/fix_av.sh +++ b/lgsm/functions/fix_av.sh @@ -10,7 +10,7 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" if [ "${postinstall}" == "1" ]; then fn_parms(){ - parms="--datapath ${avdatapath} --galaxy-name ${avgalaxy} --init-folders-only" + parms="--datapath ${avdatapath} --galaxy-name ${selfname} --init-folders-only" } fn_print_information "starting ${gamename} server to generate configs." From dc70753ead2e47106cc19deeffc6d69428d5ead3 Mon Sep 17 00:00:00 2001 From: Jimmy Maple <38733055+jimmyatSplunk@users.noreply.github.com> Date: Wed, 17 Jun 2020 16:08:41 -0400 Subject: [PATCH 61/96] fix(query): query_gamedig.sh tuning for correct player count (#2913) * fix(bug): gamedig not using correct JSON object Command to output the results for player count was looking at the wrong object in the tree. This change corrects it to the right objects. * feat(monitor): Include bot count in monitor output Update to include bot count in monitor output from Gamedig. * fix(messages): Fix to set proper component logging Fixed issue where messages from different actions weren't logging correctly due to using the wrong variable in when crafting the log message * Confirm commit for changes made Commit changes made after pull change submiited. * fix(command_backup): Correct path for exludedir variable The current implementation doesn't use the full file path to determine the existence of the backup directory in relation to the server which means the current stats just looks for the "lgsm/backup" directory. That may work if you're already in the root directory for the server but if you're scripting the backups via cron, you're not likely going to be invoking the backup from the root directory. * fix: query_gamedig.sh tuning for correct player count Reworked the jq flags to produce a count of players based on the length of the original JSON key used. However, I've found that while things like TF2 will produce the proper value, the Minecraft plugin will have an extra user online that is empty. See example below: "players": [ { "id": "81eeda65-9002-4f0d-9d3f-b4872e2a2042", "name": "iamjack1221" }, {} ] * correct else * space Co-authored-by: Daniel Gibbs --- lgsm/functions/query_gamedig.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 285cf0805..071645b49 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -22,7 +22,6 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${ip}\" --port \"${queryport}\"|jq") gamedigraw=$(gamedig --type "${querytype}" --host "${ip}" --port "${queryport}") querystatus=$(echo "${gamedigraw}" | jq '.error|length') - fi # server name. @@ -32,10 +31,14 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi # numplayers. - gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.vanilla.raw.players.online') + if [ "${querytype}" == "minecraft" ]; then + gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1') + else + gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length') + fi if [ "${gdplayers}" == "null" ]; then unset gdplayers - elif [ "${gdplayers}" == "[]" ]; then + elif [ "${gdplayers}" == "[]" ] || [ "${gdplayers}" == "-1" ]; then gdplayers=0 fi @@ -60,7 +63,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi # numbots. - gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots') + gdbots=$(echo "${gamedigraw}" | jq -re '.bots | length') if [ "${gdbots}" == "null" ]||[ "${gdbots}" == "0" ]; then unset gdbots fi From f2f8063b1179133868987fdc9c028e36d7e654ff Mon Sep 17 00:00:00 2001 From: ttocszed00 Date: Thu, 18 Jun 2020 07:19:27 +0900 Subject: [PATCH 62/96] feat(new server): Battlefield: Vietnam (#2909) --- .../config-lgsm/bfvserver/_default.cfg | 157 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/check_deps.sh | 6 + lgsm/functions/core_getopt.sh | 2 +- lgsm/functions/info_config.sh | 30 ++++ lgsm/functions/info_messages.sh | 12 ++ lgsm/functions/install_config.sh | 7 + lgsm/functions/install_server_files.sh | 2 + 8 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 lgsm/config-default/config-lgsm/bfvserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg new file mode 100644 index 000000000..d0b7215c5 --- /dev/null +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -0,0 +1,157 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES 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. + +#### Game Server Settings #### + +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="+statusMonitor 1" +} + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## 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://termbin.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" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# 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" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +stopmode="3" + +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Game Server Details +# Do not edit +gamename="Battlefield: Vietnam" +engine="refractor" +glibc="2.2.4" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${systemdir}" +executable="./start.sh" +servercfgdir="${systemdir}/mods/bfvietnam/settings" +servercfg="serversettings.con" +servercfgdefault="serversettings.con" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${serverfiles}/mods/bfvietnam/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index ac703ffe9..469ec6509 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -8,6 +8,7 @@ bb,bbserver,BrainBread bb2,bb2server,BrainBread 2 bd,bdserver,Base Defense bf1942,bf1942server,Battlefield 1942 +bfv,bfvserver,Battlefield: Vietnam bmdm,bmdmserver,Black Mesa: Deathmatch bo,boserver,Ballistic Overkill bs,bsserver,Blade Symphony diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 52f651e1b..cb1720a20 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -368,6 +368,9 @@ fn_deps_build_debian(){ # 7 Days to Die elif [ "${shortname}" == "sdtd" ]; then array_deps_required+=( telnet expect ) + # Battlefield: Vietnam + elif [ "${shortname}" == "bfv" ]; then + array_deps_required+=( libncurses5:i386 libstdc++5:i386 ) # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then if [ "${arch}" == "x86_64" ]; then @@ -480,6 +483,9 @@ fn_deps_build_redhat(){ # 7 Days to Die elif [ "${shortname}" == "sdtd" ]; then array_deps_required+=( telnet expect ) + # Battlefield: Vietnam + elif [ "${shortname}" == "bfv" ]; then + array_deps_required+=( compat-libstdc++-33.i686 glibc.i686 ) # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then array_deps_required+=( ncurses-libs.i686 ) diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 1ddc15ce2..fe31f488f 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -61,7 +61,7 @@ currentopt=( "${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monit currentopt+=( "${cmd_update_linuxgsm[@]}" ) # Exclude noupdate games here. -if [ "${engine}" != "quake" ]&&[ "${engine}" != "idtech2" ]&&[ "${engine}" != "idtech3" ]&&[ "${engine}" != "iw2.0" ]&&[ "${engine}" != "iw3.0" ]&&[ "${shortname}" != "bf1942" ]&&[ "${shortname}" != "samp" ]; then +if [ "${engine}" != "quake" ]&&[ "${engine}" != "idtech2" ]&&[ "${engine}" != "idtech3" ]&&[ "${engine}" != "iw2.0" ]&&[ "${engine}" != "iw3.0" ]&&[ "${shortname}" != "bf1942" ]&&[ "${shortname}" != "bfv" ]&&[ "${shortname}" != "samp" ]; then currentopt+=( "${cmd_update[@]}" ) # force update for SteamCMD only or MTA. if [ "${appid}" ]||[ "${shortname}" == "mta" ]; then diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 743c657e0..d16180027 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -199,6 +199,33 @@ fn_info_config_bf1942(){ fi } +fn_info_config_bfv(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + else + + servername=$(grep "game.serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName//g' | tr -d '=\";,:' | xargs) + serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) + maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + queryport="23000" + + ip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) + ipsetinconfig=1 + ipinconfigvar="game.serverIP" + + # Not Set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"0"} + fi +} + fn_info_config_chivalry(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1472,6 +1499,9 @@ elif [ "${shortname}" == "bt1944" ]; then # Battlefield: 1942 elif [ "${shortname}" == "bf1942" ]; then fn_info_config_bf1942 +# Battlefield: Vietnam +elif [ "${shortname}" == "bfv" ]; then + fn_info_config_bfv # Chivalry: Medieval Warfare elif [ "${shortname}" == "cmw" ]; then fn_info_config_chivalry diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index eb0ed43cf..0f416b573 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -982,6 +982,16 @@ fn_info_message_bf1942(){ } | column -s $'\t' -t } +fn_info_message_bfv(){ + echo -e "netstat -atunp | grep bfv_linded" + echo -e "" + { + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + } | column -s $'\t' -t +} + fn_info_message_risingworld(){ echo -e "netstat -atunp | grep java" echo -e "" @@ -1492,6 +1502,8 @@ fn_info_message_select_engine(){ fn_info_message_mumble elif [ "${shortname}" == "bf1942" ]; then fn_info_message_bf1942 + elif [ "${shortname}" == "bfv" ]; then + fn_info_message_bfv elif [ "${shortname}" == "rtcw" ]; then fn_info_message_rtcw elif [ "${shortname}" == "rust" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index ced111afb..066ecc6d3 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -239,6 +239,13 @@ elif [ "${shortname}" == "bf1942" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "bfv" ]; then + gamedirname="BattlefieldVietnam" + array_configs+=( serversettings.con ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "bs" ]; then gamedirname="BladeSymphony" array_configs+=( server.cfg ) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 9593401ce..a7b9c544c 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -11,6 +11,8 @@ fn_install_server_files(){ remote_fileurl="http://linuxgsm.download/ActionHalfLife/action_halflife-1.0.tar.xz"; local_filedir="${tmpdir}"; local_filename="action_halflife-1.0.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="61d7b79fd714888b6d65944fdaafa94a" elif [ "${shortname}" == "bf1942" ]; then remote_fileurl="http://linuxgsm.download/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz"; local_filedir="${tmpdir}"; local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="4223bf4ed85f5162c24b2cba51249b9e" + elif [ "${shortname}" == "bfv" ];then + remote_fileurl="http://linuxgsm.download/BattlefieldVietnam/bfv_linded-v1.21-20041207_patch.tar.xz"; local_filedir="${tmpdir}"; local_filename="bfv_linded-v1.21-20041207_patch.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="e3b4962cdd9d41e23c6fed65101bccde" elif [ "${shortname}" == "bb" ]; then remote_fileurl="http://linuxgsm.download/BrainBread/brainbread-v1.2-linuxserver.tar.xz"; local_filedir="${tmpdir}"; local_filename="brainbread-v1.2-linuxserver.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="55f227183b736397806d5b6db6143f15" elif [ "${shortname}" == "cod" ]; then From 555030384737eaddb8b1a7f509c971c6dabf1872 Mon Sep 17 00:00:00 2001 From: ttocszed00 Date: Thu, 18 Jun 2020 18:48:47 +0900 Subject: [PATCH 63/96] feat(newserver): Memories of Mars (#2911) --- .../config-lgsm/momserver/_default.cfg | 171 ++++++++++++++++++ lgsm/data/serverlist.csv | 1 + lgsm/functions/info_config.sh | 17 ++ lgsm/functions/info_messages.sh | 12 ++ lgsm/functions/info_parms.sh | 8 + lgsm/functions/install_config.sh | 7 + 6 files changed, 216 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/momserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg new file mode 100644 index 000000000..7e89d5b9f --- /dev/null +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -0,0 +1,171 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES 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. + +#### Game Server Settings #### + +## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="7777" +beaconport="15000" +maxplayers="32" + +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="-port=${port} -beaconport=${beaconport} -MULTIHOME="${ip}" -maxplayers=${maxplayers}" +} + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## 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://termbin.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" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# 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" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="897590" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +stopmode="2" + +## Query mode +# 1: session only +# 2: gamedig + gsquery +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Game Server Details +# Do not edit +gamename="Memories of Mars" +engine="unreal4" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/Game" +executabledir="${systemdir}/Binaries/Linux" +executable="./MemoriesOfMarsServer" +servercfgdir="${serverfiles}" +servercfg="DedicatedServerConfig.cfg" +servercfgdefault="DedicatedServerConfig.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${serverfiles}/Game/Saved/Logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 469ec6509..f294906bb 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -56,6 +56,7 @@ mc,mcserver,Minecraft mcb,mcbserver,Minecraft Bedrock mh,mhserver,MORDHAU mohaa,mohaaserver,Medal of Honor: Allied Assault +mom,momserver,Memories of Mars mta,mtaserver,Multi Theft Auto mumble,mumbleserver,Mumble nd,ndserver,Nuclear Dawn diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index d16180027..1e9992db6 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -484,6 +484,20 @@ fn_info_config_minecraft_bedrock(){ fi } +fn_info_config_mofm(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not Set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + fi +} + fn_info_config_onset(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1541,6 +1555,9 @@ elif [ "${shortname}" == "kf2" ]; then # Medal of Honor: Allied Assault elif [ "${shortname}" == "mohaa" ]; then fn_info_config_mohaa +# Memories of Mars +elif [ "${shortname}" == "mofm" ]; then + fn_info_config_mofm # QuakeWorld elif [ "${shortname}" == "qw" ]; then fn_info_config_quakeworld diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 0f416b573..843dc26a1 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -871,6 +871,16 @@ fn_info_message_mohaa(){ } | column -s $'\t' -t } +fn_info_message_mom(){ + echo -e "netstat -atunp | grep MemoriesOfMar" + echo -e "" + { + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> BeaconPort\tINBOUND\t${beaconport}\tudp" + } | column -s $'\t' -t +} + fn_info_message_mumble(){ echo -e "netstat -atunp | grep murmur" echo -e "" @@ -1446,6 +1456,8 @@ fn_info_message_select_engine(){ fn_info_message_minecraft_bedrock elif [ "${shortname}" == "onset" ]; then fn_info_message_onset + elif [ "${shortname}" == "mom" ]; then + fn_info_message_mom elif [ "${shortname}" == "pz" ]; then fn_info_message_projectzomboid elif [ "${shortname}" == "pstbs" ]; then diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 1a6a42bb8..f30d90020 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -85,6 +85,11 @@ fn_info_parms_mohaa(){ defaultmap=${defaultmap:-"NOT SET"} } +fn_info_parms_mom(){ + port=${port:-"7777"} + beaconport=${queryport:-"15000"} +} + fn_info_parms_mta(){ queryport=$((port + 123)) } @@ -245,6 +250,9 @@ elif [ "${shortname}" == "kf2" ]; then fn_info_parms_kf2 elif [ "${shortname}" == "mohaa" ]; then fn_info_parms_mohaa +#Memories of Mars +elif [ "${shortname}" == "mom" ]; then + fn_info_parms_mom # Project Zomboid elif [ "${shortname}" == "pz" ]; then fn_info_parms_projectzomboid diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 066ecc6d3..e57b2daac 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -570,6 +570,13 @@ elif [ "${shortname}" == "mta" ]; then fn_fetch_default_config fn_default_config_remote fn_list_config_locations +elif [ "${shotname}" == "mom" ];then + gamedirname="MemoriesofMars" + array_configs+=( DedicatedServerConfig.cfg) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "mumble" ]; then gamedirname="Mumble" array_configs+=( murmur.ini ) From a40bdf3b8064240ac3e185b3c450b77ef9e7a21a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 18 Jun 2020 21:36:35 +0100 Subject: [PATCH 64/96] fix(bf1942server): alter query type to protocol-gamespy1 (#2932) --- lgsm/config-default/config-lgsm/bf1942server/_default.cfg | 2 +- lgsm/functions/info_config.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index ebb977a92..04bcef9b3 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -119,7 +119,7 @@ stopmode="2" # 4: gsquery # 5: tcp querymode="2" -querytype="protocol-valve" +querytype="protocol-gamespy1" ## Game Server Details # Do not edit diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 1e9992db6..a59f96d79 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -181,7 +181,7 @@ fn_info_config_bf1942(){ queryport="${zero}" else - servername=$(grep "game.serverName " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs) + servername=$(grep "game.serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs) serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs) maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') From dcbe35b23c2acd8b70e2338d39b4b07d46a08a4e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 22 Jun 2020 08:45:46 +0100 Subject: [PATCH 65/96] Remove Patreon Link --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 357dfdf6e..5712ac3e7 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,7 +1,7 @@ # These are supported funding model platforms github: dgibbs64 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: dgibbs # Replace with a single Patreon username +patreon: # 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 From 276419fff52d196d39d522b78311e3689f7dfd82 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 3 Jul 2020 22:19:15 +0100 Subject: [PATCH 66/96] feat(arkserver): add support for epic store players. (#2947) --- lgsm/config-default/config-lgsm/arkserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index a657d6273..f7c3ad573 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -19,7 +19,7 @@ maxplayers="70" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="\"${defaultmap}?AltSaveDirectoryName=${defaultmap}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods\"" +parms="${defaultmap}?AltSaveDirectoryName=${defaultmap}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${ip}" } #### LinuxGSM Settings #### From af4e07e9d41a39495916003d472d4ede2e31c43d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 4 Jul 2020 16:20:17 +0100 Subject: [PATCH 67/96] feat(arkserver): add altsavedirectoryname to allow custom save location (#2948) --- lgsm/config-default/config-lgsm/arkserver/_default.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index f7c3ad573..11f29d17b 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -15,11 +15,12 @@ queryport="27015" rconport="27020" # Default Map: TheIsland, Ragnarok, CrystalIsles, Aberration_P, ScorchedEarth_P defaultmap="TheIsland" +altsavedirectoryname="${defaultmap}" maxplayers="70" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="${defaultmap}?AltSaveDirectoryName=${defaultmap}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${ip}" +parms="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${ip}" } #### LinuxGSM Settings #### From bf4eb65ab3081304b5926a26389e2f3b69ffa9d6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 4 Jul 2020 17:23:16 +0100 Subject: [PATCH 68/96] comment update --- lgsm/functions/check_deps.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index cb1720a20..c7d0ed06f 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -339,7 +339,7 @@ fn_deps_build_debian(){ # LinuxGSM requirements. array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq tmux netcat ) - # All servers except ts3, mumble, GTA and minecraft servers require libstdc++6 and lib32gcc1. + # All servers except ts3, mumble, GTA and minecraft servers require lib32stdc++6 and lib32gcc1. if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${engine}" != "renderware" ]; then if [ "${arch}" == "x86_64" ]; then array_deps_required+=( lib32gcc1 lib32stdc++6 ) @@ -370,7 +370,7 @@ fn_deps_build_debian(){ array_deps_required+=( telnet expect ) # Battlefield: Vietnam elif [ "${shortname}" == "bfv" ]; then - array_deps_required+=( libncurses5:i386 libstdc++5:i386 ) + array_deps_required+=( libncurses5:i386 libstdc++5:i386 ) # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then if [ "${arch}" == "x86_64" ]; then @@ -485,7 +485,7 @@ fn_deps_build_redhat(){ array_deps_required+=( telnet expect ) # Battlefield: Vietnam elif [ "${shortname}" == "bfv" ]; then - array_deps_required+=( compat-libstdc++-33.i686 glibc.i686 ) + array_deps_required+=( compat-libstdc++-33.i686 glibc.i686 ) # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then array_deps_required+=( ncurses-libs.i686 ) From 7208626e878f6279164521b6b52d34dffbb9f2be Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 5 Jul 2020 15:30:28 +0100 Subject: [PATCH 69/96] fix(tf2server): remove libtcmalloc-minimal4:i386 and gperftools-libs.i686 (#2950) --- lgsm/functions/check_deps.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index c7d0ed06f..9c6481803 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -381,9 +381,6 @@ fn_deps_build_debian(){ # Brainbread 2, Don't Starve Together & Team Fortress 2 elif [ "${shortname}" == "bb2" ]||[ "${shortname}" == "dst" ]||[ "${shortname}" == "tf2" ]; then array_deps_required+=( libcurl4-gnutls-dev:i386 ) - if [ "${shortname}" == "tf2" ]; then - array_deps_required+=( libtcmalloc-minimal4:i386 ) - fi # Call of Duty & Medal of Honor: Allied Assault elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${shortname}" == "cod2" ]||[ "${shortname}" == "mohaa" ]; then array_deps_required+=( libstdc++5:i386 ) @@ -492,9 +489,6 @@ fn_deps_build_redhat(){ # Brainbread 2, Don't Starve Together & Team Fortress 2 elif [ "${shortname}" == "bb2" ]||[ "${shortname}" == "dst" ]||[ "${shortname}" == "tf2" ]; then array_deps_required+=( libcurl.i686 ) - if [ "${shortname}" == "tf2" ]; then - array_deps_required+=( gperftools-libs.i686 ) - fi # Call of Duty & Medal of Honor: Allied Assault elif [ "${shortname}" == "cod" ]||[ "${shortname}" == "coduo" ]||[ "${shortname}" == "cod2" ]||[ "${shortname}" == "mohaa" ]; then array_deps_required+=( compat-libstdc++-33.i686 ) From f6a907054f8c612514f228ecdf90622d23d08a3b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 5 Jul 2020 22:12:40 +0100 Subject: [PATCH 70/96] feat(ut2k4server): update release to 3369.3 (#2952) --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index a7b9c544c..ec5c60989 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -48,7 +48,7 @@ fn_install_server_files(){ elif [ "${shortname}" == "ts" ]; then remote_fileurl="http://linuxgsm.download/TheSpecialists/ts-3-linux-final.tar.xz"; local_filedir="${tmpdir}"; local_filename="ts-3-linux-final.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="3c66ecff6e3644f7ac88015732a0fb93" elif [ "${shortname}" == "ut2k4" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament2004/ut2004-server-3369-2-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-2-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="8ebcb9b8f703905053d13a35c3af3e79" + remote_fileurl="http://linuxgsm.download/UnrealTournament2004/ut2004-server-3369-3-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-3-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="9fceaab68554749f4b45be66613b9a15" elif [ "${shortname}" == "ut99" ]; then remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-451-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut99-server-451-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="42c6839f8cb95907eeef71a1838aa1f7" elif [ "${shortname}" == "ut" ]; then From 1d57607a3f53c5cfd1df2f18c63692382dde578a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 5 Jul 2020 22:13:13 +0100 Subject: [PATCH 71/96] fix(debian 11): change name of lib32gcc1 to lib32gcc-s1 for debian 11 (#2951) --- lgsm/functions/check_deps.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 9c6481803..17a2c4ada 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -184,8 +184,15 @@ if [ "${javacheck}" == "1" ]; then fi # Define required dependencies for SteamCMD. if [ "${appid}" ]; then - if [ "${deptocheck}" == "glibc.i686" ]||[ "${deptocheck}" == "libstdc++64.i686" ]||[ "${deptocheck}" == "lib32gcc1" ]||[ "${deptocheck}" == "lib32stdc++6" ]; then - steamcmdfail=1 + # lib32gcc1 is now called lib32gcc-s1 in debian 11 + if [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; then + if [ "${deptocheck}" == "glibc.i686" ]||[ "${deptocheck}" == "libstdc++64.i686" ]||[ "${deptocheck}" == "lib32gcc-s1" ]||[ "${deptocheck}" == "lib32stdc++6" ]; then + steamcmdfail=1 + fi + else + if [ "${deptocheck}" == "glibc.i686" ]||[ "${deptocheck}" == "libstdc++64.i686" ]||[ "${deptocheck}" == "lib32gcc1" ]||[ "${deptocheck}" == "lib32stdc++6" ]; then + steamcmdfail=1 + fi fi fi fi @@ -342,7 +349,12 @@ fn_deps_build_debian(){ # All servers except ts3, mumble, GTA and minecraft servers require lib32stdc++6 and lib32gcc1. if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${engine}" != "renderware" ]; then if [ "${arch}" == "x86_64" ]; then - array_deps_required+=( lib32gcc1 lib32stdc++6 ) + # lib32gcc1 is now called lib32gcc-s1 in debian 11 + if [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; then + array_deps_required+=( lib32gcc-s1 lib32stdc++6 ) + else + array_deps_required+=( lib32gcc1 lib32stdc++6 ) + fi else array_deps_required+=( lib32stdc++6 ) fi From 8462086922d570f8f19997330b366b2cfbe78291 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 8 Jul 2020 21:42:16 +0100 Subject: [PATCH 72/96] fix(info): gather external ip from ipify.org instead of ifconfig.co (#2953) --- lgsm/functions/info_distro.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 1e2a519f4..c50953cdc 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -228,7 +228,7 @@ netlink=$(ethtool "${netint}" 2>/dev/null| grep Speed | awk '{print $2}') # External IP address if [ -z "${extip}" ]; then - extip=$(curl -4 -m 3 ifconfig.co 2>/dev/null) + extip=$(curl -s https://api.ipify.org 2>/dev/null) exitcode=$? # Should ifconfig.co return an error will use last known IP. if [ ${exitcode} -eq 0 ]; then @@ -238,14 +238,14 @@ if [ -z "${extip}" ]; then if [ -f "${tmpdir}/extip.txt" ]; then extip=$(cat "${tmpdir}/extip.txt") else - echo -e "x.x.x.x" + fn_print_error_nl "Unable to get external IP" fi fi else if [ -f "${tmpdir}/extip.txt" ]; then extip=$(cat "${tmpdir}/extip.txt") else - echo -e "x.x.x.x" + fn_print_error_nl "Unable to get external IP" fi fi fi From a41f38801ebbf66dc68c6b1a3de12e3d8057b305 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 8 Jul 2020 21:49:29 +0100 Subject: [PATCH 73/96] fix: hard lock reference (#2956) --- 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 3a333a578..691fd5f7c 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -107,7 +107,7 @@ for queryattempt in {1..5}; do fn_print_delay_eol_nl fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago" - fn_script_log_info "Server started: $(date -d @$(cat lgsm/lock/bmdmserver.lock))" + fn_script_log_info "Server started: $(date -d @$(cat "${lockdir}/${selfname}.lock"))" fn_script_log_info "Current time: $(date)" monitorpass=1 core_exit.sh From c94b8fac754a2ae8daac075219b04e2215416fa8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 9 Jul 2020 09:58:05 +0100 Subject: [PATCH 74/96] Update no-response.yml --- .github/no-response.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/no-response.yml b/.github/no-response.yml index 34cf8d447..432ff0cd1 100644 --- a/.github/no-response.yml +++ b/.github/no-response.yml @@ -3,8 +3,8 @@ # Number of days of inactivity before an Issue is closed for lack of response daysUntilClose: 60 # Label requiring a response -responseRequiredLabel: "needs more info" +responseRequiredLabel: "status: waiting response" # Comment to post when closing an Issue for lack of response. Set to `false` to disable closeComment: > This issue has been automatically closed because there has been no response - to this issue and is now stale. \ No newline at end of file + to this issue and is now stale. From 8316d878531c35f2f96d6e1697ae21944916aaa5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 12 Jul 2020 23:16:22 +0100 Subject: [PATCH 75/96] fix(log): allow logs to correctly display primary command (#2958) --- lgsm/functions/alert.sh | 1 + lgsm/functions/check_last_update.sh | 1 + lgsm/functions/check_steamcmd.sh | 2 +- lgsm/functions/check_version.sh | 1 + lgsm/functions/command_backup.sh | 38 +- lgsm/functions/command_console.sh | 10 +- lgsm/functions/command_debug.sh | 10 +- lgsm/functions/command_details.sh | 9 +- lgsm/functions/command_dev_clear_functions.sh | 9 +- lgsm/functions/command_dev_debug.sh | 9 +- lgsm/functions/command_dev_detect_deps.sh | 9 +- lgsm/functions/command_dev_detect_glibc.sh | 9 +- lgsm/functions/command_dev_detect_ldd.sh | 9 +- lgsm/functions/command_dev_query_raw.sh | 9 +- lgsm/functions/command_donate.sh | 9 +- lgsm/functions/command_fastdl.sh | 31 +- lgsm/functions/command_install.sh | 10 +- .../command_install_resources_mta.sh | 9 +- lgsm/functions/command_mods_install.sh | 9 +- lgsm/functions/command_mods_remove.sh | 18 +- lgsm/functions/command_mods_update.sh | 9 +- lgsm/functions/command_monitor.sh | 10 +- lgsm/functions/command_postdetails.sh | 9 +- lgsm/functions/command_restart.sh | 11 +- lgsm/functions/command_start.sh | 12 +- lgsm/functions/command_stop.sh | 9 +- lgsm/functions/command_test_alert.sh | 9 +- lgsm/functions/command_ts3_server_pass.sh | 13 +- lgsm/functions/command_update.sh | 9 +- lgsm/functions/command_update_linuxgsm.sh | 9 +- lgsm/functions/command_validate.sh | 39 +- lgsm/functions/command_wipe.sh | 339 +++++++++--------- lgsm/functions/compress_unreal2_maps.sh | 9 +- lgsm/functions/compress_ut99_maps.sh | 9 +- lgsm/functions/core_dl.sh | 6 +- lgsm/functions/fix_kf.sh | 4 + lgsm/functions/fix_kf2.sh | 2 + lgsm/functions/fix_ro.sh | 4 + lgsm/functions/fix_ut2k4.sh | 4 + lgsm/functions/fix_ut3.sh | 2 + lgsm/functions/fix_wurm.sh | 2 + lgsm/functions/info_messages.sh | 4 +- lgsm/functions/install_modules.sh | 1 + lgsm/functions/mods_core.sh | 16 +- lgsm/functions/update_factorio.sh | 12 +- lgsm/functions/update_minecraft.sh | 13 +- lgsm/functions/update_minecraft_bedrock.sh | 14 +- lgsm/functions/update_mta.sh | 12 +- lgsm/functions/update_mumble.sh | 11 +- lgsm/functions/update_steamcmd.sh | 11 +- lgsm/functions/update_ts3.sh | 4 + linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 6 +- tests/tests_jc2server.sh | 6 +- tests/tests_mcserver.sh | 6 +- tests/tests_ts3server.sh | 6 +- 56 files changed, 504 insertions(+), 352 deletions(-) diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 5f8fe156e..236ca6461 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -99,6 +99,7 @@ fn_alert_log if [ "${postalert}" == "on" ]&&[ -n "${postalert}" ]; then exitbypass=1 command_postdetails.sh + fn_commandname elif [ "${postalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "More Info not enabled" fn_script_log_warn "More Info alerts not enabled" diff --git a/lgsm/functions/check_last_update.sh b/lgsm/functions/check_last_update.sh index 52e4cfce0..08343e560 100644 --- a/lgsm/functions/check_last_update.sh +++ b/lgsm/functions/check_last_update.sh @@ -20,5 +20,6 @@ if [ -f "${lockdir}/lastupdate.lock" ]&&[ "${status}" != "0" ]; then fn_print_info "${selfname} has not been restarted since last update" fn_script_log_info "${selfname} has not been restarted since last update" command_restart.sh + fn_commandname fi fi diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index aa4140bbe..456870054 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -130,7 +130,7 @@ fn_check_steamcmd_clear(){ if [ "$(command -v steamcmd 2>/dev/null)" ]&&[ -d "${rootdir}/steamcmd" ]; then rm -rf "${steamcmddir:?}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_script_log_fatal "Removing ${rootdir}/steamcmd" else fn_script_log_pass "Removing ${rootdir}/steamcmd" diff --git a/lgsm/functions/check_version.sh b/lgsm/functions/check_version.sh index 6db78091d..a0b0bc50c 100644 --- a/lgsm/functions/check_version.sh +++ b/lgsm/functions/check_version.sh @@ -16,4 +16,5 @@ if [ -n "${modulesversion}" ]&&[ -n "${version}" ]&&[ "${version}" != "${modules fn_sleep_time fn_script_log_error "LinuxGSM Version mismatch: ${selfname}: ${version}: modules: ${modulesversion}" command_update_linuxgsm.sh + fn_commandname fi diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 537e86f1c..7d62e965b 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -5,9 +5,12 @@ # Website: https://linuxgsm.com # Description: Creates a .tar.gz file in the backup directory. -commandname="BACKUP" -commandaction="Backing up" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="BACKUP" + commandaction="Backing up" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname check.sh @@ -61,22 +64,20 @@ fn_backup_init(){ # Check if server is started and whether to stop it. fn_backup_stop_server(){ check_status.sh - # Server is stopped. - if [ "${status}" == "0" ]; then - serverstopped="no" - # Server is running and stoponbackup=off. - elif [ "${stoponbackup}" == "off" ]; then - serverstopped="no" + # Server is running but will not be stopped. + if [ "${stoponbackup}" == "off" ]; then fn_print_warn_nl "${selfname} is currently running" echo -e "* Although unlikely; creating a backup while ${selfname} is running might corrupt the backup." fn_script_log_warn "${selfname} is currently running" fn_script_log_warn "Although unlikely; creating a backup while ${selfname} is running might corrupt the backup" # Server is running and will be stopped if stoponbackup=on or unset. - else + # If server is started + elif [ "${status}" != "0" ]; then fn_stop_warning - serverstopped="yes" + startserver="1" exitbypass=1 command_stop.sh + fn_commandname fi } @@ -140,7 +141,7 @@ fn_backup_compression(){ tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}/backup.lock" ./. local exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol fn_script_log_fatal "Backup in progress: FAIL" echo -e "${extractcmd}" | tee -a "${lgsmlog}" @@ -247,25 +248,26 @@ fn_backup_relpath() { } fn_stop_warning(){ - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during backup" - fn_script_log_warn "Updating server: SteamCMD: ${selfname} will be stopped during backup" + fn_print_warn "this game server will be stopped during backup" + fn_script_log_warn "this game server will be stopped during backup" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during backup: ${totalseconds}" + fn_print_warn "this game server will be stopped during backup: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "Updating server: SteamCMD: ${selfname} will be stopped during backup" + fn_print_warn_nl "this game server will be stopped during backup" } -# Restart the server if it was stopped for the backup. +# Start the server if it was stopped for the backup. fn_backup_start_server(){ - if [ "${serverstopped}" == "yes" ]; then + if [ -n "${startserver}" ]; then exitbypass=1 command_start.sh + fn_commandname fi } diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index 18e674652..02040d5c5 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Gives access to the server tmux console. -commandname="CONSOLE" -commandaction="Access console" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="CONSOLE" + commandaction="Access console" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname check.sh fn_print_header @@ -35,6 +38,7 @@ else if fn_prompt_yn "Do you want to start the server?" Y; then exitbypass=1 command_start.sh + fn_commandname fi fi diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 5aeb0d5e1..4addb86b5 100644 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Runs the server without tmux and directly from the terminal. -commandname="DEBUG" -commandaction="Debuging" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="DEBUG" + commandaction="Debuging" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname # Trap to remove lockfile on quit. fn_lockfile_trap(){ @@ -88,6 +91,7 @@ fn_print_info_nl "Stopping any running servers" fn_script_log_info "Stopping any running servers" exitbypass=1 command_stop.sh +fn_commandname unset exitbypass fn_print_dots "Starting debug" fn_script_log_info "Starting debug" diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index c2abc0ba0..b90f8a6f5 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -5,9 +5,12 @@ # Website: https://linuxgsm.com # Description: Displays server information. -commandname="DETAILS" -commandaction="Viewing details" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="DETAILS" + commandaction="Viewing details" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname # Run checks and gathers details to display. check.sh diff --git a/lgsm/functions/command_dev_clear_functions.sh b/lgsm/functions/command_dev_clear_functions.sh index 0c2faa375..935ebb4ef 100644 --- a/lgsm/functions/command_dev_clear_functions.sh +++ b/lgsm/functions/command_dev_clear_functions.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Deletes the contents of the functions dir. -commandname="DEV-CLEAR-MODULES" -commandaction="Clearing modules" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="DEV-CLEAR-MODULES" + commandaction="Clearing modules" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname echo -e "=================================" echo -e "Clear Functions" diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh index 962b01e7f..4a076df9e 100644 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/functions/command_dev_debug.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Dev only: Enables debugging log to be saved to dev-debug.log. -commandname="DEV-DEBUG" -commandaction="Developer debug" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="DEV-DEBUG" + commandaction="Developer debug" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname if [ -f "${rootdir}/.dev-debug" ]; then rm "${rootdir:?}/.dev-debug" diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index 04f37d696..089aa9af3 100644 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Detects dependencies the server binary requires. -commandname="DEV-DETECT-DEPS" -commandaction="Developer detect deps" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="DEV-DETECT-DEPS" + commandaction="Developer detect deps" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname echo -e "=================================" echo -e "Dependencies Checker" diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh index 2289bb818..c2feae0c9 100644 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ b/lgsm/functions/command_dev_detect_glibc.sh @@ -5,9 +5,12 @@ # Description: Automatically detects the version of GLIBC that is required. # Can check a file or directory recursively. -commandname="DEV-DETECT-GLIBC" -commandaction="Developer detect glibc" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="DEV-DETECT-GLIBC" + commandaction="Developer detect glibc" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname echo -e "=================================" echo -e "glibc Requirements Checker" diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/functions/command_dev_detect_ldd.sh index 850845179..60766cce5 100644 --- a/lgsm/functions/command_dev_detect_ldd.sh +++ b/lgsm/functions/command_dev_detect_ldd.sh @@ -5,9 +5,12 @@ # Description: Automatically detects required deps using ldd. # Can check a file or directory recursively. -commandname="DEV-DETECT-LDD" -commandaction="Developer detect ldd" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="DEV-DETECT-LDD" + commandaction="Developer detect ldd" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname echo -e "=================================" echo -e "Shared Object dependencies Checker" diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index 22ed232ec..00005c22c 100644 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Raw gamedig output of the server. -commandname="DEV-QUERY-RAW" -commandaction="Developer query raw" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="DEV-QUERY-RAW" + commandaction="Developer query raw" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname check.sh info_config.sh diff --git a/lgsm/functions/command_donate.sh b/lgsm/functions/command_donate.sh index 9bb7f2faf..0483e4aa1 100644 --- a/lgsm/functions/command_donate.sh +++ b/lgsm/functions/command_donate.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Shows ways to donate. -commandname="DONATE" -commandaction="Donate" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="DONATE" + commandaction="Donate" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname fn_print_ascii_logo echo -e "${lightyellow}Support LinuxGSM${default}" diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index f6a5897db..a4d06d5e6 100644 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -5,9 +5,12 @@ # Website: https://linuxgsm.com # Description: Creates a FastDL directory. -commandname="FASTDL" -commandaction="Fastdl" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="FASTDL" + commandaction="Fastdl" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname check.sh @@ -69,7 +72,7 @@ fn_clear_old_fastdl(){ echo -en "clearing existing FastDL directory ${fastdldir}..." rm -fR "${fastdldir:?}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Clearing existing FastDL directory ${fastdldir}" core_exit.sh @@ -86,7 +89,7 @@ fn_fastdl_dirs(){ echo -en "creating web directory ${webdir}..." mkdir -p "${webdir}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Creating web directory ${webdir}" core_exit.sh @@ -99,7 +102,7 @@ fn_fastdl_dirs(){ echo -en "creating fastdl directory ${fastdldir}..." mkdir -p "${fastdldir}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Creating fastdl directory ${fastdldir}" core_exit.sh @@ -245,7 +248,7 @@ fn_fastdl_gmod(){ echo -e "copying ${allowed_extention} : ${fileswc}..." cp --parents "${fastdlfile}" "${fastdldir}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}" core_exit.sh @@ -262,7 +265,7 @@ fn_fastdl_gmod(){ echo -en "updating addons file structure..." cp -Rf "${fastdldir}"/addons/*/* "${fastdldir}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Updating addons file structure" core_exit.sh @@ -275,7 +278,7 @@ fn_fastdl_gmod(){ fn_sleep_time rm -fR "${fastdldir:?}/addons" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Clearing addons dir from fastdl dir" core_exit.sh @@ -290,7 +293,7 @@ fn_fastdl_gmod(){ fn_sleep_time cp -Rf "${fastdldir}/lua/"* "${fastdldir}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Correcting DarkRP files" core_exit.sh @@ -342,7 +345,7 @@ fn_fastdl_source(){ fi cp "${fastdlfile}" "${fastdldir}/${copytodir}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" core_exit.sh @@ -378,7 +381,7 @@ fn_fastdl_gmod_dl_enforcer(){ echo -en "removing existing download enforcer: ${luafastdlfile}..." rm -f "${luafastdlfullpath:?}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Removing existing download enforcer ${luafastdlfullpath}" core_exit.sh @@ -396,7 +399,7 @@ fn_fastdl_gmod_dl_enforcer(){ echo -e "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}" done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \) -printf '%P\n') exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Creating new download enforcer ${luafastdlfullpath}" core_exit.sh @@ -413,7 +416,7 @@ fn_fastdl_bzip2(){ echo -en "\r\033[Kcompressing ${filetocompress}..." bzip2 -f "${filetocompress}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Compressing ${filetocompress}" core_exit.sh diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index 9a6b64e98..23fdd3179 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -5,9 +5,12 @@ # Website: https://linuxgsm.com # Description: Overall function for the installer. -commandname="INSTALL" -commandaction="Installing" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="INSTALL" + commandaction="Installing" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname check.sh if [ "$(whoami)" = "root" ]; then @@ -42,6 +45,7 @@ else install_ts3db.sh elif [ "${shortname}" == "mta" ]; then command_install_resources_mta.sh + fn_commandname fi fix.sh diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 053982e0b..4c641dcef 100644 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Installs the default resources for Multi Theft Auto. -commandname="DEFAULT-RESOURCES" -commandaction="Default Resources" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="DEFAULT-RESOURCES" + commandaction="Default Resources" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname fn_install_resources(){ echo -e "" diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh index d3c517461..48bf116b3 100644 --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/functions/command_mods_install.sh @@ -5,9 +5,12 @@ # Website: https://linuxgsm.com # Description: List and installs available mods along with mods_list.sh and mods_core.sh. -commandname="MODS-INSTALL" -commandaction="Installing mods" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="MODS-INSTALL" + commandaction="Installing mods" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname check.sh mods_core.sh diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh index 35fd41d5f..b2062333e 100644 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/functions/command_mods_remove.sh @@ -5,9 +5,12 @@ # Website: https://linuxgsm.com # Description: Uninstall mods along with mods_list.sh and mods_core.sh. -commandname="MODS-REMOVE" -commandaction="Removing mods" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="MODS-REMOVE" + commandaction="Removing mods" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname check.sh mods_core.sh @@ -70,7 +73,7 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do if [ -f "${modinstalldir}/${currentfileremove}" ]||[ -d "${modinstalldir}/${currentfileremove}" ]; then rm -rf "${modinstalldir:?}/${currentfileremove:?}" ((exitcode=$?)) - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_script_log_fatal "Removing ${modinstalldir}/${currentfileremove}" break else @@ -81,7 +84,7 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do echo -e "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..." ((modfileline++)) done -if [ ${exitcode} -ne 0 ]; then +if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl core_exit.sh else @@ -92,7 +95,7 @@ echo -en "removing ${modcommand}-files.txt..." fn_sleep_time rm -rf "${modsdir:?}/${modcommand}-files.txt" local exitcode=$? -if [ ${exitcode} -ne 0 ]; then +if [ "${exitcode}" != 0 ]; then fn_script_log_fatal "Removing ${modsdir}/${modcommand}-files.txt" fn_print_fail_eol_nl core_exit.sh @@ -107,7 +110,7 @@ fn_sleep_time sed -i "/^${modcommand}$/d" "${modsinstalledlistfullpath}" local exitcode=$? -if [ ${exitcode} -ne 0 ]; then +if [ "${exitcode}" != 0 ]; then fn_script_log_fatal "Removing ${modcommand} from ${modsinstalledlist}" fn_print_fail_eol_nl core_exit.sh @@ -123,6 +126,7 @@ if [ "${engine}" == "unity3d" ]&&[[ "${modprettyname}" == *"Oxide"* ]]; then fn_script_log "Validating to restore original ${gamename} files replaced by Oxide" exitbypass="1" command_validate.sh + fn_commandname unset exitbypass fi echo -e "${modprettyname} removed" diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh index 165b4ea98..d6cd15e70 100644 --- a/lgsm/functions/command_mods_update.sh +++ b/lgsm/functions/command_mods_update.sh @@ -5,9 +5,12 @@ # Website: https://linuxgsm.com # Description: Updates installed mods along with mods_list.sh and mods_core.sh. -commandname="MODS-UPDATE" -commandaction="Updating mods" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="MODS-UPDATE" + commandaction="Updating mods" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname check.sh mods_core.sh diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 691fd5f7c..adc2be363 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -6,9 +6,12 @@ # Description: Monitors server by checking for running processes # then passes to gamedig and gsquery. -commandname="MONITOR" -commandaction="Monitoring" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="MONITOR" + commandaction="Monitoring" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname fn_monitor_check_lockfile(){ # Monitor does not run it lockfile is not found. @@ -170,6 +173,7 @@ for queryattempt in {1..5}; do alert="restartquery" alert.sh command_restart.sh + fn_commandname core_exit.sh fi elif [ "${querymethod}" == "gamedig" ]; then diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index a0afa2905..0d40b6a0b 100644 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -5,9 +5,12 @@ # Website: https://linuxgsm.com # Description: Strips sensitive information out of Details output -commandname="POST-DETAILS" -commandaction="Posting details" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="POST-DETAILS" + commandaction="Posting details" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname # Set posttarget to the appropriately-defined post destination. diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh index 8a08c04ff..47fa163a8 100644 --- a/lgsm/functions/command_restart.sh +++ b/lgsm/functions/command_restart.sh @@ -4,13 +4,16 @@ # Website: https://linuxgsm.com # Description: Restarts the server. -commandname="MODS-INSTALL" -commandaction="Restarting" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="MODS-INSTALL" + commandaction="Restarting" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname info_config.sh exitbypass=1 command_stop.sh command_start.sh - +fn_commandname core_exit.sh diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index d0487e5d4..c78bcc158 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -5,9 +5,12 @@ # Website: https://linuxgsm.com # Description: Starts the server. -commandname="START" -commandaction="Starting" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="START" + commandaction="Starting" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname fn_start_teamspeak3(){ if [ ! -f "${servercfgfullpath}" ]; then @@ -188,8 +191,7 @@ if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateon exitbypass=1 unset updateonstart command_update.sh - commandname="START" - commandaction="Starting" + fn_commandname fi fn_print_dots "${servername}" diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 6ea4f4d7a..085f9996a 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -5,9 +5,12 @@ # Website: https://linuxgsm.com # Description: Stops the server. -commandname="STOP" -commandaction="Stopping" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="STOP" + commandaction="Stopping" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname # Attempts graceful shutdown by sending 'CTRL+c'. fn_stop_graceful_ctrlc(){ diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh index 5d1c11885..969c648ca 100644 --- a/lgsm/functions/command_test_alert.sh +++ b/lgsm/functions/command_test_alert.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Sends a test alert. -commandname="TEST-ALERT" -commandaction="Sending Alert" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="TEST-ALERT" + commandaction="Sending Alert" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname fn_print_dots "${servername}" check.sh diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh index 8ff799e6e..ba25747cc 100644 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -5,9 +5,12 @@ # Website: https://linuxgsm.com # Description: Changes TS3 serveradmin password. -commandname="CHANGE-PASSWORD" -commandaction="Changing password" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="CHANGE-PASSWORD" + commandaction="Changing password" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname fn_serveradmin_password_prompt(){ fn_print_header @@ -28,6 +31,7 @@ fn_serveradmin_password_set(){ ts3serverpass="1" exitbypass="1" command_start.sh + fn_commandname fn_print_ok_nl "New password applied" fn_script_log_pass "New ServerAdmin password applied" } @@ -39,13 +43,16 @@ if [ "${status}" != "0" ]; then # Stop any running server. exitbypass="1" command_stop.sh + fn_commandname fn_serveradmin_password_set parms="serveradmin_password=\"${newpassword}\" inifile=\"${servercfgfullpath}\" > /dev/null 2>&1" ts3serverpass="0" command_restart.sh + fn_commandname else fn_serveradmin_password_set command_stop.sh + fn_commandname fi core_exit.sh diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index 88109a147..b6254937a 100644 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Handles updating of servers. -commandname="UPDATE" -commandaction="Updating" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="UPDATE" + commandaction="Updating" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname fn_print_dots "" check.sh diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index c32bf321f..e4028cf18 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Deletes the functions dir to allow re-downloading of functions from GitHub. -commandname="UPDATE-LGSM" -commandaction="Updating LinuxGSM" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="UPDATE-LGSM" + commandaction="Updating LinuxGSM" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname check.sh diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 276458e48..a00fb99ce 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -4,23 +4,26 @@ # Website: https://linuxgsm.com # Description: Runs a server validation. -commandname="VALIDATE" -commandaction="Validating" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="VALIDATE" + commandaction="Validating" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname fn_validate(){ - fn_script_log_warn "Validating server: SteamCMD: Validate might overwrite some customised files" + fn_script_log_warn "SteamCMD: Validate might overwrite some customised files" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Validating server: SteamCMD: Validate might overwrite some customised files: ${totalseconds}" + fn_print_warn "SteamCMD: Validate might overwrite some customised files: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "Validating server: SteamCMD: Validate might overwrite some customised files" - fn_print_start_nl "Validating server: SteamCMD" + fn_print_warn_nl "SteamCMD: Validate might overwrite some customised files" + fn_print_start_nl "SteamCMD" fn_script_log_info "Validating server: SteamCMD" if [ -d "${steamcmddir}" ]; then cd "${steamcmddir}" || exit @@ -40,8 +43,7 @@ fn_validate(){ ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_info_print 70 +app_set_config 90 mod "${appidmod}" +app_update "${appid}" "${branch}" +app_update "${appid}" validate +quit | tee -a "${lgsmlog}" fi elif [ "${shortname}" == "ac" ]; then - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" validate +quit - local exitcode=$? + ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" validate +quit | tee -a "${lgsmlog}" # All other servers. elif [ -n "${branch}" ]; then ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" validate +quit | tee -a "${lgsmlog}" @@ -50,42 +52,43 @@ fn_validate(){ fi exitcode=$? - fn_print_dots "Validating server: SteamCMD" + fn_print_dots "SteamCMD" if [ "${exitcode}" != "0" ]; then - fn_print_fail_nl "Validating server: SteamCMD" + fn_print_fail_nl "SteamCMD" fn_script_log_fatal "Validating server: SteamCMD: FAIL" else - fn_print_ok_nl "Validating server: SteamCMD" + fn_print_ok_nl "SteamCMD" fn_script_log_pass "Validating server: SteamCMD: OK" fi core_exit.sh } fn_stop_warning(){ - fn_print_warn "Validating server: SteamCMD: ${selfname} will be stopped during validation" - fn_script_log_warn "Validating server: SteamCMD: ${selfname} will be stopped during validation" + fn_print_warn "this game server will be stopped during validate" + fn_script_log_warn "this game server will be stopped during validate" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Validating server: SteamCMD: ${selfname} will be stopped during validation: ${totalseconds}" + fn_print_warn "this game server will be stopped during validate: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "Validating server: SteamCMD: ${selfname} will be stopped during validation" + fn_print_warn_nl "this game server will be stopped during validate" } -fn_print_dots "Validating server" -fn_print_dots "Validating server: SteamCMD" +fn_print_dots "SteamCMD" check.sh if [ "${status}" != "0" ]; then fn_stop_warning exitbypass=1 command_stop.sh + fn_commandname fn_validate exitbypass=1 command_start.sh + fn_commandname else fn_validate fi diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 5b5abf552..96e10a98f 100644 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -5,34 +5,17 @@ # Website: https://linuxgsm.com # Description: Wipes server data, useful after updates for some games like Rust -commandname="WIPE" -commandaction="Wiping" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - -check.sh -fn_print_header -fn_script_log "Entering ${gamename} ${commandaction}" - -# Process to server wipe. -fn_wipe_server_process(){ - check_status.sh - if [ "${status}" != "0" ]; then - exitbypass=1 - command_stop.sh - fn_wipe_server_remove_files - exitbypass=1 - command_start.sh - else - fn_wipe_server_remove_files - fi - echo -e "server data wiped" - fn_script_log "server data wiped." +fn_commandname(){ + commandname="WIPE" + commandaction="Wiping" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" } +fn_commandname # Provides an exit code upon error. fn_wipe_exit_code(){ ((exitcode=$?)) - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_script_log_fatal "${currentaction}" core_exit.sh else @@ -41,166 +24,190 @@ fn_wipe_exit_code(){ } # Removes files to wipe server. -fn_wipe_server_remove_files(){ - # Rust Wipe. - if [ "${shortname}" == "rust" ]; then - # Wipe pocedural map. - if [ "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.map")" ]; then - currentaction="Removing map file(s): ${serveridentitydir}/proceduralmap.*.map" - echo -en "Removing procedural map proceduralmap.*.map file(s)..." - fn_sleep_time - fn_script_log "${currentaction}" - find "${serveridentitydir:?}" -type f -name "proceduralmap.*.map" -delete - fn_wipe_exit_code - fn_sleep_time - else - fn_print_information_nl "No procedural map file to remove" - fn_script_log_info "No procedural map file to remove." - fi - # Wipe procedural map save. - if [ "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.sav")" ]; then - currentaction="Removing procedural map save(s): ${serveridentitydir}/proceduralmap.*.sav" - echo -en "Removing map saves proceduralmap.*.sav file(s)..." - fn_sleep_time - fn_script_log "${currentaction}" - find "${serveridentitydir:?}" -type f -name "proceduralmap.*.sav" -delete - fn_wipe_exit_code - fn_sleep_time - else - fn_print_information_nl "No procedural map save to remove" - fn_script_log_info "No procedural map save to remove." - fi - # Wipe Barren map. - if [ "$(find "${serveridentitydir}" -type f -name "barren*.map")" ]; then - currentaction="Removing map file(s): ${serveridentitydir}/barren*.map" - echo -en "Removing barren map barren*.map file(s)..." - fn_sleep_time - fn_script_log "${currentaction}" - find "${serveridentitydir:?}" -type f -name "barren*.map" -delete - fn_wipe_exit_code - fn_sleep_time - else - fn_print_information_nl "No barren map file to remove" - fn_script_log_info "No barren map file to remove." - fi - # Wipe barren map save. - if [ "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]; then - currentaction="Removing barren map save(s): ${serveridentitydir}/barren*.sav" - echo -en "Removing barren map saves barren*.sav file(s)..." - fn_sleep_time - fn_script_log "${currentaction}" - find "${serveridentitydir:?}" -type f -name "barren*.sav" -delete - fn_wipe_exit_code - fn_sleep_time - else - fn_print_information_nl "No barren map save to remove" - fn_script_log_info "No barren map save to remove." - fi - # Wipe user dir, might be a legacy thing, maybe to be removed. - if [ -d "${serveridentitydir}/user" ]; then - currentaction="Removing user directory: ${serveridentitydir}/user" - echo -en "Removing user directory..." - fn_sleep_time - fn_script_log "${currentaction}" - rm -rf "${serveridentitydir:?}/user" - fn_wipe_exit_code - fn_sleep_time +fn_wipe_server_files(){ + fn_print_start_nl "Wiping server" + fn_script_log_info "Wiping server" + # Wipe procedural map. + if [ "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.map")" ]; then + echo -en "removing procedural map proceduralmap.*.map file(s)..." + fn_sleep_time + fn_script_log_info "Removing procedural map file(s): ${serveridentitydir}/proceduralmap.*.map" + find "${serveridentitydir:?}" -type f -name "proceduralmap.*.map" -delete | tee -a "${lgsmlog}" + fn_wipe_exit_code + fn_sleep_time + else + echo -e "no procedural map file to remove" + fn_sleep_time + fn_script_log_pass "No procedural map file to remove" + fi + # Wipe procedural map save. + if [ "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.sav")" ]; then + echo -en "removing map saves proceduralmap.*.sav file(s)..." + fn_sleep_time + fn_script_log_info "Removing procedural map save(s): ${serveridentitydir}/proceduralmap.*.sav" + find "${serveridentitydir:?}" -type f -name "proceduralmap.*.sav" -delete | tee -a "${lgsmlog}" + fn_wipe_exit_code + fn_sleep_time + else + echo -e "no procedural map save to remove" + fn_sleep_time + fn_script_log_pass "No procedural map save to remove" + fi + # Wipe Barren map. + if [ "$(find "${serveridentitydir}" -type f -name "barren*.map")" ]; then + echo -en "removing barren map barren*.map file(s)..." + fn_sleep_time + fn_script_log_info "Removing map file(s): ${serveridentitydir}/barren*.map" + find "${serveridentitydir:?}" -type f -name "barren*.map" -delete | tee -a "${lgsmlog}" + fn_wipe_exit_code + fn_sleep_time + else + echo -e "no barren map file to remove" + fn_sleep_time + fn_script_log_pass "No barren map file to remove" + fi + # Wipe barren map save. + if [ "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]; then + echo -en "removing barren map saves barren*.sav file(s)..." + fn_sleep_time + fn_script_log_info "Removing barren map save(s): ${serveridentitydir}/barren*.sav" + find "${serveridentitydir:?}" -type f -name "barren*.sav" -delete | tee -a "${lgsmlog}" + fn_wipe_exit_code + fn_sleep_time + else + echo -e "no barren map save to remove" + fn_sleep_time + fn_script_log_pass "No barren map save to remove." + fi + # Wipe user dir, might be a legacy thing, maybe to be removed. + if [ -d "${serveridentitydir}/user" ]; then + echo -en "removing user directory..." + fn_sleep_time + fn_script_log_info "removing user directory: ${serveridentitydir}/user" + rm -rf "${serveridentitydir:?}/user" + fn_wipe_exit_code + fn_sleep_time # We do not print additional information if there is nothing to remove since this might be obsolete. - fi - # Wipe storage dir, might be a legacy thing, maybe to be removed. - if [ -d "${serveridentitydir}/storage" ]; then - currentaction="Removing storage directory: ${serveridentitydir}/storage" - echo -en "Removing storage directory..." - fn_sleep_time - fn_script_log "${currentaction}" - rm -rf "${serveridentitydir:?}/storage" - fn_wipe_exit_code - fn_sleep_time + fi + # Wipe storage dir, might be a legacy thing, maybe to be removed. + if [ -d "${serveridentitydir}/storage" ]; then + echo -en "removing storage directory..." + fn_sleep_time + fn_script_log_info "removing storage directory: ${serveridentitydir}/storage" + rm -rf "${serveridentitydir:?}/storage" + fn_wipe_exit_code + fn_sleep_time # We do not print additional information if there is nothing to remove since this might be obsolete. - fi - # Wipe sv.files. - if [ "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then - currentaction="Removing server misc files: ${serveridentitydir}/sv.files.*.db" - echo -en "Removing server misc srv.files*.db file(s)..." - fn_sleep_time - fn_script_log "${currentaction}" - find "${serveridentitydir:?}" -type f -name "sv.files.*.db" -delete - fn_wipe_exit_code - fn_sleep_time + fi + # Wipe sv.files. + if [ "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then + echo -en "removing server misc srv.files*.db file(s)..." + fn_sleep_time + fn_script_log_info "Removing server misc files: ${serveridentitydir}/sv.files.*.db" + find "${serveridentitydir:?}" -type f -name "sv.files.*.db" -delete | tee -a "${lgsmlog}" + fn_wipe_exit_code + fn_sleep_time # No further information if not found because it should I could not get this file showing up. - fi - # Wipe player death files. - if [ "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]; then - currentaction="Removing player death files: ${serveridentitydir}/player.deaths.*.db" - echo -en "Removing player deaths player.deaths.*.db file(s)..." + fi + # Wipe player death files. + if [ "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]; then + echo -en "removing player deaths player.deaths.*.db file(s)..." + fn_sleep_time + fn_script_log_info "Removing player death files: ${serveridentitydir}/player.deaths.*.db" + find "${serveridentitydir:?}" -type f -name "player.deaths.*.db" -delete | tee -a "${lgsmlog}" + fn_wipe_exit_code + fn_sleep_time + else + echo -e "no player death to remove" + fn_sleep_time + fn_script_log_pass "No player death to remove" + fi + # Wipe blueprints only if full-wipe command was used. + if [ "${fullwipe}" == "1" ]; then + if [ "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then + echo -en "removing blueprints player.blueprints.*.db file(s)..." fn_sleep_time - fn_script_log "${currentaction}" - find "${serveridentitydir:?}" -type f -name "player.deaths.*.db" -delete + fn_script_log_info "Removing blueprint file(s): ${serveridentitydir}/player.blueprints.*.db" + find "${serveridentitydir:?}" -type f -name "player.blueprints.*.db" -delete | tee -a "${lgsmlog}" fn_wipe_exit_code fn_sleep_time else - fn_print_information_nl "No player death to remove" - fn_script_log_info "No player death to remove." - fi - # Wipe blueprints only if wipeall command was used. - if [ "${wipeall}" == "1" ]; then - if [ "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then - currentaction="Removing blueprint file(s): ${serveridentitydir}/player.blueprints.*.db" - echo -en "Removing blueprints player.blueprints.*.db file(s)..." - fn_sleep_time - fn_script_log "${currentaction}" - find "${serveridentitydir:?}" -type f -name "player.blueprints.*.db" -delete - fn_wipe_exit_code - fn_sleep_time - else - fn_print_information_nl "No blueprint file to remove" - fn_script_log_info "No blueprint file to remove." - fi - elif [ "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then - fn_print_information_nl "Keeping blueprints" - fn_script_log_info "Keeping blueprints." - else - fn_print_information_nl "No blueprints found" - fn_script_log_info "No blueprints found." - fn_sleep_time + echo -e "no blueprint file to remove" + fn_sleep_time + fn_script_log_pass "No blueprint file to remove" fi - # Wipe some logs that might be there. - if [ "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]; then - currentaction="Removing log files: ${serveridentitydir}/Log.*.txt" - echo -en "Removing Log files..." + elif [ "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then + echo -e "keeping blueprints" fn_sleep_time - fn_script_log "${currentaction}" - find "${serveridentitydir:?}" -type f -name "Log.*.txt" -delete - fn_wipe_exit_code + fn_script_log_info "Keeping blueprints" + else + echo -e "no blueprints found" fn_sleep_time + fn_script_log_pass "No blueprints found" + fi + # Wipe some logs that might be there. + if [ "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]; then + echo -en "removing Log files..." + fn_sleep_time + fn_script_log_info "Removing log files: ${serveridentitydir}/Log.*.txt" + find "${serveridentitydir:?}" -type f -name "Log.*.txt" -delete + fn_wipe_exit_code + fn_sleep_time # We do not print additional information if there are no logs to remove. - fi - # You can add an "elif" here to add another game or engine. fi } -# Check if there is something to wipe, prompt the user, and call appropriate functions. -# Rust Wipe. -if [ "${shortname}" == "rust" ]; then - if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then - fn_print_warning_nl "Any user, storage, log and map data from ${serveridentitydir} will be erased." - if ! fn_prompt_yn "Continue?" Y; then - core_exit.sh +fn_stop_warning(){ + fn_print_warn "this game server will be stopped during wipe" + fn_script_log_warn "this game server will be stopped during wipe" + totalseconds=3 + for seconds in {3..1}; do + fn_print_warn "this game server will be stopped during wipe: ${totalseconds}" + totalseconds=$((totalseconds - 1)) + sleep 1 + if [ "${seconds}" == "0" ]; then + break fi - fn_script_log_info "User selects to erase any user, storage, log and map data from ${serveridentitydir}" - fn_sleep_time - fn_wipe_server_process + done + fn_print_warn_nl "this game server will be stopped during wipe" +} + +fn_wipe_warning(){ + fn_print_warn "wipe is about to start" + fn_script_log_warn "wipe is about to start" + totalseconds=3 + for seconds in {3..1}; do + fn_print_warn "wipe is about to start: ${totalseconds}" + totalseconds=$((totalseconds - 1)) + sleep 1 + if [ "${seconds}" == "0" ]; then + break + fi + done + fn_print_warn "wipe is about to start" +} + +fn_print_dots "" +check.sh + +# Check if there is something to wipe. +if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then + fn_wipe_warning + check_status.sh + if [ "${status}" != "0" ]; then + fn_stop_warning + exitbypass=1 + command_stop.sh + fn_commandname + fn_wipe_server_files + exitbypass=1 + command_start.sh + fn_commandname else - fn_print_information_nl "No data to wipe was found" - fn_script_log_info "No data to wipe was found." - core_exit.sh + fn_wipe_server_files fi -# You can add an "elif" here to add another game or engine. -else - # Game not listed. - fn_print_information_nl "Wipe is not available for this game" - fn_script_log_info "Wipe is not available for this game." - core_exit.sh + fn_print_ok_nl "" + fn_script_log_pass "Wiping server" fi core_exit.sh diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh index 3580c20c9..e08dd666f 100644 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Compresses unreal maps. -commandname="MAP-COMPRESSOR" -commandaction="Compressing maps" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="MAP-COMPRESSOR" + commandaction="Compressing maps" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname check.sh fn_print_header diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh index 677f5aaa2..e475c466b 100644 --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/functions/compress_ut99_maps.sh @@ -4,9 +4,12 @@ # Website: https://linuxgsm.com # Description: Compresses unreal maps. -commandname="MAP-COMPRESSOR" -commandaction="Compressing maps" -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_commandname(){ + commandname="MAP-COMPRESSOR" + commandaction="Compressing maps" + functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +} +fn_commandname check.sh fn_print_header diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 89ee784db..514eb3da8 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -25,7 +25,7 @@ fn_clear_tmp(){ if [ -d "${tmpdir}" ]; then rm -rf "${tmpdir:?}/"* local exitcode=$? - if [ ${exitcode} -eq 0 ]; then + if [ "${exitcode}" == 0 ]; then fn_print_ok_eol_nl fn_script_log_pass "clearing LinuxGSM tmp directory" else @@ -82,7 +82,7 @@ fn_dl_extract(){ extractcmd=$(unzip -qo -d "${extractdir}" "${local_filedir}/${local_filename}") fi local exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Extracting download" if [ -f "${lgsmlog}" ]; then @@ -171,7 +171,7 @@ fn_fetch_file(){ fi # On first try will error. On second try will fail. - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then if [ ${counter} -ge 2 ]; then fn_print_fail_eol_nl if [ -f "${lgsmlog}" ]; then diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh index f0c29ee6f..a745094b0 100644 --- a/lgsm/functions/fix_kf.sh +++ b/lgsm/functions/fix_kf.sh @@ -21,11 +21,15 @@ echo -e "forcing server restart..." fn_sleep_time exitbypass=1 command_start.sh +fn_commandname sleep 5 exitbypass=1 command_stop.sh +fn_commandname exitbypass=1 command_start.sh +fn_commandname sleep 5 exitbypass=1 command_stop.sh +fn_commandname diff --git a/lgsm/functions/fix_kf2.sh b/lgsm/functions/fix_kf2.sh index 77edd77e8..99e96543a 100644 --- a/lgsm/functions/fix_kf2.sh +++ b/lgsm/functions/fix_kf2.sh @@ -14,6 +14,8 @@ fn_print_information "starting ${gamename} server to generate configs." fn_sleep_time exitbypass=1 command_start.sh +fn_commandname sleep 10 exitbypass=1 command_stop.sh +fn_commandname diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh index 9f08d56d7..902fed7fe 100644 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/functions/fix_ro.sh @@ -24,11 +24,15 @@ echo -e "forcing server restart..." fn_sleep_time exitbypass=1 command_start.sh +fn_commandname sleep 5 exitbypass=1 command_stop.sh +fn_commandname exitbypass=1 command_start.sh +fn_commandname sleep 5 exitbypass=1 command_stop.sh +fn_commandname diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh index fa2d29bf5..07805d42b 100644 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -21,11 +21,15 @@ echo -e "forcing server restart." fn_sleep_time exitbypass=1 command_start.sh +fn_commandname sleep 5 exitbypass=1 command_stop.sh +fn_commandname exitbypass=1 command_start.sh +fn_commandname sleep 5 exitbypass=1 command_stop.sh +fn_commandname diff --git a/lgsm/functions/fix_ut3.sh b/lgsm/functions/fix_ut3.sh index e6c018d00..ad9b3db4e 100644 --- a/lgsm/functions/fix_ut3.sh +++ b/lgsm/functions/fix_ut3.sh @@ -14,6 +14,8 @@ fn_print_information "starting ${gamename} server to generate configs." fn_sleep_time exitbypass=1 command_start.sh +fn_commandname sleep 10 exitbypass=1 command_stop.sh +fn_commandname diff --git a/lgsm/functions/fix_wurm.sh b/lgsm/functions/fix_wurm.sh index 809651d55..40325d729 100644 --- a/lgsm/functions/fix_wurm.sh +++ b/lgsm/functions/fix_wurm.sh @@ -18,8 +18,10 @@ if [ ! -d "${serverfiles}/Creative" ]; then fixbypass=1 exitbypass=1 command_start.sh + fn_commandname sleep 10 exitbypass=1 command_stop.sh + fn_commandname unset parmsbypass fi diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 843dc26a1..d423e0f4a 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -135,7 +135,7 @@ fn_info_message_gameserver_resource(){ echo -e "${lightyellow}Game Server Resource Usage${default}" fn_messages_separator { - if [ "${status}" == "1" ]; then + if [ "${status}" != "0" ]; then echo -e "${lightblue}CPU Used:\t${default}${cpuused}%${default}" echo -e "${lightblue}Mem Used:\t${default}${pmemused}%\t${memused}MB${default}" else @@ -1515,7 +1515,7 @@ fn_info_message_select_engine(){ elif [ "${shortname}" == "bf1942" ]; then fn_info_message_bf1942 elif [ "${shortname}" == "bfv" ]; then - fn_info_message_bfv + fn_info_message_bfv elif [ "${shortname}" == "rtcw" ]; then fn_info_message_rtcw elif [ "${shortname}" == "rust" ]; then diff --git a/lgsm/functions/install_modules.sh b/lgsm/functions/install_modules.sh index c512b69a3..39729fd23 100644 --- a/lgsm/functions/install_modules.sh +++ b/lgsm/functions/install_modules.sh @@ -14,3 +14,4 @@ cp "${tmpdir}/LinuxGSM-master/lgsm/functions"/*.sh "${functionsdir}" cp "${tmpdir}/LinuxGSM-master/lgsm/functions"/*.py "${functionsdir}" chmod +x "${functionsdir}"/* command_update_linuxgsm.sh +fn_commandname diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index da2576207..bd6b6275c 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -53,7 +53,7 @@ fn_mod_lowercase(){ done < <(find "${extractdir}" -depth) echo -en "${renamedwc} / ${totalfileswc} / ${fileswc} converting ${modprettyname} files to lowercase..." - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl core_exit.sh else @@ -69,7 +69,7 @@ fn_mod_create_filelist(){ # ${modsdir}/${modcommand}-files.txt. find "${extractdir}" -mindepth 1 -printf '%P\n' > "${modsdir}/${modcommand}-files.txt" local exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Building ${modsdir}/${modcommand}-files.txt" core_exit.sh @@ -89,7 +89,7 @@ fn_mod_copy_destination(){ fn_sleep_time cp -Rf "${extractdir}/." "${modinstalldir}/" local exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Copying ${modprettyname} to ${modinstalldir}" else @@ -127,7 +127,7 @@ fn_mod_tidy_files_list(){ sed -i "/^${removefilevar}$/d" "${modsdir}/${modcommand}-files.txt" # Exit on error. local exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Error while tidying line: ${removefilevar} from: ${modsdir}/${modcommand}-files.txt" core_exit.sh @@ -382,7 +382,7 @@ fn_create_mods_dir(){ echo -en "creating LinuxGSM mods data directory ${modsdir}..." mkdir -p "${modsdir}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Creating mod download dir ${modsdir}" core_exit.sh @@ -396,7 +396,7 @@ fn_create_mods_dir(){ echo -en "creating mods install directory ${modinstalldir}..." mkdir -p "${modinstalldir}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Creating mod install directory ${modinstalldir}" core_exit.sh @@ -419,7 +419,7 @@ fn_mods_create_tmp_dir(){ mkdir -p "${modstmpdir}" exitcode=$? echo -en "creating mod download directory ${modstmpdir}..." - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Creating mod download directory ${modstmpdir}" core_exit.sh @@ -436,7 +436,7 @@ fn_mods_clear_tmp_dir(){ echo -en "clearing mod download directory ${modstmpdir}..." rm -fr "${modstmpdir:?}" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Clearing mod download directory ${modstmpdir}" core_exit.sh diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 5ff67c448..869314d60 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -96,17 +96,21 @@ fn_update_factorio_compare(){ fn_update_factorio_dl exitbypass=1 command_start.sh + fn_commandname exitbypass=1 command_stop.sh + fn_commandname # If server started. else fn_stop_warning exitbypass=1 command_stop.sh + fn_commandname exitbypass=1 fn_update_factorio_dl exitbypass=1 command_start.sh + fn_commandname fi date +%s > "${lockdir}/lastupdate.lock" alert="update" @@ -131,18 +135,18 @@ fn_update_factorio_compare(){ } fn_stop_warning(){ - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" - fn_script_log_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn "this game server will be stopped during update" + fn_script_log_warn "this game server will be stopped during update" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update: ${totalseconds}" + fn_print_warn "this game server will be stopped during update: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn_nl "this game server will be stopped during update" } # The location where the builds are checked and downloaded. diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 556097bd6..62cf6a80c 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -44,8 +44,10 @@ fn_update_minecraft_localbuild(){ fn_script_log_info "Forcing server restart" exitbypass=1 command_stop.sh + fn_commandname exitbypass=1 command_start.sh + fn_commandname totalseconds=0 # Check again, allow time to generate logs. while [ ! -f "${serverfiles}/logs/latest.log" ]; do @@ -157,15 +159,18 @@ fn_update_minecraft_compare(){ command_start.sh exitbypass=1 command_stop.sh + fn_commandname # If server started. else fn_stop_warning exitbypass=1 command_stop.sh + fn_commandname exitbypass=1 fn_update_minecraft_dl exitbypass=1 command_start.sh + fn_commandname fi date +%s > "${lockdir}/lastupdate.lock" alert="update" @@ -190,18 +195,18 @@ fn_update_minecraft_compare(){ } fn_stop_warning(){ - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" - fn_script_log_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn "this game server will be stopped during update" + fn_script_log_warn "this game server will be stopped during update" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update: ${totalseconds}" + fn_print_warn "this game server will be stopped during update: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn_nl "this game server will be stopped during update" } # The location where the builds are checked and downloaded. diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index 61cad6854..1e22053a1 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -47,13 +47,16 @@ fn_update_minecraft_localbuild(){ if [ "${status}" == "0" ]; then exitbypass=1 command_start.sh + fn_commandname sleep 3 exitbypass=1 command_stop.sh + fn_commandname # If server started. else exitbypass=1 command_stop.sh + fn_commandname fi fi @@ -123,15 +126,18 @@ fn_update_minecraft_compare(){ command_start.sh exitbypass=1 command_stop.sh + fn_commandname # If server started. else fn_stop_warning exitbypass=1 command_stop.sh + fn_commandname exitbypass=1 fn_update_minecraft_dl exitbypass=1 command_start.sh + fn_commandname fi date +%s > "${lockdir}/lastupdate.lock" alert="update" @@ -150,18 +156,18 @@ fn_update_minecraft_compare(){ } fn_stop_warning(){ - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" - fn_script_log_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn "this game server will be stopped during update" + fn_script_log_warn "this game server will be stopped during update" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update: ${totalseconds}" + fn_print_warn "this game server will be stopped during update: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn_nl "this game server will be stopped during update" } # The location where the builds are checked and downloaded. diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 5aaecc122..caf6bc57b 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -40,6 +40,7 @@ fn_update_mta_localbuild(){ command_stop.sh exitbypass=1 command_start.sh + fn_commandname totalseconds=0 # Check again, allow time to generate logs. while [ ! -f "${serverfiles}/mods/deathmatch/logs/server.log" ]; do @@ -154,15 +155,18 @@ fn_update_mta_compare(){ command_start.sh exitbypass=1 command_stop.sh + fn_commandname # If server started. else fn_stop_warning exitbypass=1 command_stop.sh + fn_commandname exitbypass=1 fn_update_mta_dl exitbypass=1 command_start.sh + fn_commandname fi date +%s > "${lockdir}/lastupdate.lock" alert="update" @@ -181,18 +185,18 @@ fn_update_mta_compare(){ } fn_stop_warning(){ - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" - fn_script_log_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn "this game server will be stopped during update" + fn_script_log_warn "this game server will be stopped during update" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update: ${totalseconds}" + fn_print_warn "this game server will be stopped during update: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn_nl "this game server will be stopped during update" } # The location where the builds are checked and downloaded. diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index ee6a2b0ad..969913ba3 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -91,15 +91,18 @@ fn_update_mumble_compare(){ command_start.sh exitbypass=1 command_stop.sh + fn_commandname # If server started. else fn_stop_warning exitbypass=1 command_stop.sh + fn_commandname exitbypass=1 fn_update_mumble_dl exitbypass=1 command_start.sh + fn_commandname fi date +%s > "${lockdir}/lastupdate.lock" alert="update" @@ -118,18 +121,18 @@ fn_update_mumble_compare(){ } fn_stop_warning(){ - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" - fn_script_log_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn "this game server will be stopped during update" + fn_script_log_warn "this game server will be stopped during update" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update: ${totalseconds}" + fn_print_warn "this game server will be stopped during update: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn_nl "this game server will be stopped during update" } # The location where the builds are checked and downloaded. diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 8a089c7f7..cfa6d6aa2 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -128,10 +128,12 @@ fn_update_steamcmd_compare(){ fn_stop_warning exitbypass=1 command_stop.sh + fn_commandname exitbypass=1 fn_update_steamcmd_dl exitbypass=1 command_start.sh + fn_commandname fi date +%s > "${lockdir}/lastupdate.lock" alert="update" @@ -206,18 +208,18 @@ fn_appmanifest_check(){ } fn_stop_warning(){ - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" - fn_script_log_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn "this game server will be stopped during update" + fn_script_log_warn "this game server will be stopped during update" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update: ${totalseconds}" + fn_print_warn "this game server will be stopped during update: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "Updating server: SteamCMD: ${selfname} will be stopped during update" + fn_print_warn_nl "this game server will be stopped during update" } # The location where the builds are checked and downloaded. @@ -235,6 +237,7 @@ if [ "${forceupdate}" == "1" ]; then date +%s > "${lockdir}/lastupdate.lock" exitbypass=1 command_start.sh + fn_commandname else fn_update_steamcmd_dl date +%s > "${lockdir}/lastupdate.lock" diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index a5cc0dd60..5bcf14bff 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -44,6 +44,7 @@ fn_update_ts3_localbuild(){ command_stop.sh exitbypass=1 command_start.sh + fn_commandname totalseconds=0 # Check again, allow time to generate logs. while [ ! -d "${serverfiles}/logs" ]||[ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; do @@ -152,15 +153,18 @@ fn_update_ts3_compare(){ command_start.sh exitbypass=1 command_stop.sh + fn_commandname # If server started. else fn_stop_warning exitbypass=1 command_stop.sh + fn_commandname exitbypass=1 fn_update_ts3_dl exitbypass=1 command_start.sh + fn_commandname fi date +%s > "${lockdir}/lastupdate.lock" alert="update" diff --git a/linuxgsm.sh b/linuxgsm.sh index aececaed8..849c76472 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -113,7 +113,7 @@ fn_bootstrap_fetch_file(){ fi # On first try will error. On second try will fail. - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then if [ ${counter} -ge 2 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index da71c2b5a..adb465b1a 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -119,7 +119,7 @@ fn_bootstrap_fetch_file(){ fi # On first try will error. On second try will fail. - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then if [ ${counter} -ge 2 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then @@ -389,7 +389,7 @@ else echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then echo -e "FAIL" exit 1 else @@ -402,7 +402,7 @@ else echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then echo -e "FAIL" exit 1 else diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index b52cf1f1b..eaf7047e9 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -120,7 +120,7 @@ fn_bootstrap_fetch_file(){ fi # On first try will error. On second try will fail. - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then if [ ${counter} -ge 2 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then @@ -390,7 +390,7 @@ else echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then echo -e "FAIL" exit 1 else @@ -403,7 +403,7 @@ else echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then echo -e "FAIL" exit 1 else diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 8d7bab6b6..74b86b0d6 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -120,7 +120,7 @@ fn_bootstrap_fetch_file(){ fi # On first try will error. On second try will fail. - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then if [ ${counter} -ge 2 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then @@ -390,7 +390,7 @@ else echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then echo -e "FAIL" exit 1 else @@ -403,7 +403,7 @@ else echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then echo -e "FAIL" exit 1 else diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index fb4f889bf..d785fa0b5 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -120,7 +120,7 @@ fn_bootstrap_fetch_file(){ fi # On first try will error. On second try will fail. - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then if [ ${counter} -ge 2 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then @@ -390,7 +390,7 @@ else echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then echo -e "FAIL" exit 1 else @@ -403,7 +403,7 @@ else echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" exitcode=$? - if [ ${exitcode} -ne 0 ]; then + if [ "${exitcode}" != 0 ]; then echo -e "FAIL" exit 1 else From be0c4488962e4b060cea93ec704d87d1500ef7bf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 13 Jul 2020 00:28:05 +0100 Subject: [PATCH 76/96] feat(steamcmd): refactor how SteamCMD server downloads are handled (#2959) Handling of SteamCMD and error checking --- lgsm/functions/check.sh | 4 +- lgsm/functions/command_backup.sh | 17 +--- lgsm/functions/command_validate.sh | 68 +++----------- lgsm/functions/core_dl.sh | 96 +++++++++++++++++++ lgsm/functions/core_messages.sh | 15 +++ lgsm/functions/core_trap.sh | 3 + lgsm/functions/install_server_files.sh | 103 +-------------------- lgsm/functions/update_factorio.sh | 17 +--- lgsm/functions/update_minecraft.sh | 17 +--- lgsm/functions/update_minecraft_bedrock.sh | 17 +--- lgsm/functions/update_mta.sh | 17 +--- lgsm/functions/update_mumble.sh | 17 +--- lgsm/functions/update_steamcmd.sh | 71 +++----------- lgsm/functions/update_ts3.sh | 17 +--- 14 files changed, 147 insertions(+), 332 deletions(-) diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index 3e8fa90a2..b50754e3d 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -48,7 +48,7 @@ if [ "$(whoami)" != "root" ]; then done fi -allowed_commands_array=( BACKUP CONSOLE DEBUG DETAILS MAP-COMPRESSOR FASTDL MODS-INSTALL MODS-REMOVE MODS-UPDATE MONITOR POST-DETAILS RESTART START STOP TEST-ALERT CHANGE-PASSWORD UPDATE UPDATE-LGSM VALIDATE WIPW ) +allowed_commands_array=( BACKUP CONSOLE DEBUG DETAILS MAP-COMPRESSOR FASTDL MODS-INSTALL MODS-REMOVE MODS-UPDATE MONITOR POST-DETAILS RESTART START STOP TEST-ALERT CHANGE-PASSWORD UPDATE UPDATE-LGSM VALIDATE WIPE ) for allowed_command in "${allowed_commands_array[@]}" do if [ "${allowed_command}" == "${commandname}" ]; then @@ -82,7 +82,7 @@ do fi done -allowed_commands_array=( DEBUG START VALIDATE ) +allowed_commands_array=( DEBUG START UPDATE VALIDATE ) for allowed_command in "${allowed_commands_array[@]}" do if [ "${allowed_command}" == "${commandname}" ]; then diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 7d62e965b..620820932 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -73,7 +73,7 @@ fn_backup_stop_server(){ # Server is running and will be stopped if stoponbackup=on or unset. # If server is started elif [ "${status}" != "0" ]; then - fn_stop_warning + fn_print_restart_warning startserver="1" exitbypass=1 command_stop.sh @@ -247,21 +247,6 @@ fn_backup_relpath() { fi } -fn_stop_warning(){ - fn_print_warn "this game server will be stopped during backup" - fn_script_log_warn "this game server will be stopped during backup" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "this game server will be stopped during backup: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "this game server will be stopped during backup" -} - # Start the server if it was stopped for the backup. fn_backup_start_server(){ if [ -n "${startserver}" ]; then diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index a00fb99ce..1ddded9c0 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -12,76 +12,30 @@ fn_commandname(){ fn_commandname fn_validate(){ - fn_script_log_warn "SteamCMD: Validate might overwrite some customised files" + fn_print_warn "Validate might overwrite some customised files" + fn_script_log_warn "${commandaction} server: Validate might overwrite some customised files" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "SteamCMD: Validate might overwrite some customised files: ${totalseconds}" + fn_print_warn "Validate might overwrite some customised files: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "SteamCMD: Validate might overwrite some customised files" - fn_print_start_nl "SteamCMD" - fn_script_log_info "Validating server: SteamCMD" - if [ -d "${steamcmddir}" ]; then - cd "${steamcmddir}" || exit - fi - # Detects if unbuffer command is available, for 32 bit distributions only. - info_distro.sh - if [ "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then - unbuffer="stdbuf -i0 -o0 -e0" - fi + fn_print_warn_nl "Validate might overwrite some customised files" - # If GoldSrc (appid 90) servers. GoldSrc (appid 90) require extra commands. - if [ "${appid}" == "90" ]; then - # If using a specific branch. - if [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_info_print 70 +app_set_config 90 mod "${appidmod}" +app_update "${appid}" "${branch}" +app_update "${appid}" -beta "${branch}" validate +quit | tee -a "${lgsmlog}" - else - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_info_print 70 +app_set_config 90 mod "${appidmod}" +app_update "${appid}" "${branch}" +app_update "${appid}" validate +quit | tee -a "${lgsmlog}" - fi - elif [ "${shortname}" == "ac" ]; then - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" validate +quit | tee -a "${lgsmlog}" - # All other servers. - elif [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" validate +quit | tee -a "${lgsmlog}" - else - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" validate +quit | tee -a "${lgsmlog}" - fi - - exitcode=$? - fn_print_dots "SteamCMD" - if [ "${exitcode}" != "0" ]; then - fn_print_fail_nl "SteamCMD" - fn_script_log_fatal "Validating server: SteamCMD: FAIL" - else - fn_print_ok_nl "SteamCMD" - fn_script_log_pass "Validating server: SteamCMD: OK" - fi - core_exit.sh -} - -fn_stop_warning(){ - fn_print_warn "this game server will be stopped during validate" - fn_script_log_warn "this game server will be stopped during validate" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "this game server will be stopped during validate: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "this game server will be stopped during validate" + fn_dl_steamcmd } -fn_print_dots "SteamCMD" +# The location where the builds are checked and downloaded. +remotelocation="SteamCMD" check.sh + +fn_print_dots "${remotelocation}" + if [ "${status}" != "0" ]; then - fn_stop_warning + fn_print_restart_warning exitbypass=1 command_stop.sh fn_commandname diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 514eb3da8..6cd481506 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -19,6 +19,102 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_dl_steamcmd(){ + fn_print_start_nl "${remotelocation}" + fn_script_log_info "${commandaction} server: ${remotelocation}" + + if [ -d "${steamcmddir}" ]; then + cd "${steamcmddir}" || exit + fi + + # Unbuffer will allow the output of steamcmd not buffer allowing a smooth output. + # unbuffer us part of the expect package. + if [ "$(command -v unbuffer)" ]; then + unbuffer="unbuffer" + fi + + # Validate will be added as a parameter if required. + if [ "${commandname}" == "VALIDATE" ]||[ "${commandname}" == "INSTALL" ]; then + validate="validate" + fi + + # To do error checking for SteamCMD the output of steamcmd will be saved to a log. + steamcmdlog="${lgsmlogdir}/${selfname}-steamcmd.log" + + # clear previous steamcmd log + if [ -f "${steamcmdlog}" ]; then + rm -f "${steamcmdlog:?}" + fi + counter=0 + while [ "${counter}" == "0" ]||[ "${exitcode}" != "0" ]; do + counter=$((counter+1)) + # Select SteamCMD parameters + # If GoldSrc (appid 90) servers. GoldSrc (appid 90) require extra commands. + if [ "${appid}" == "90" ]; then + # If using a specific branch. + if [ -n "${branch}" ]; then + ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" + else + ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" + fi + # Force Windows Platform type. + elif [ "${shortname}" == "ac" ]; then + if [ -n "${branch}" ]; then + ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" + else + ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" + fi + # All other servers. + else + if [ -n "${branch}" ]; then + ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" + else + ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" + fi + fi + + # Error checking for SteamCMD. Some errors will loop to try again and some will just exit. + exitcode=$? + if [ -n "$(grep "Error!" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "ERROR!" "${steamcmdlog}" | tail -1)" ]; then + # Not enough space. + if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} server: ${remotelocation}: Not enough space to download server files" + fn_script_log_fatal "${commandaction} server: ${remotelocation}: Not enough space to download server files" + core_exit.sh + # Need tp purchase game. + elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} server: ${remotelocation}: Steam account does not have a license for the required game" + fn_script_log_fatal "${commandaction} server: ${remotelocation}: Steam account does not have a license for the required game" + core_exit.sh + # Two-factor authentication failure + elif [ -n "$(grep "Two-factor code mismatch" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} server: ${remotelocation}: Two-factor authentication failure" + fn_script_log_fatal "${commandaction} server: ${remotelocation}: Two-factor authentication failure" + core_exit.sh + # Update did not finish. + elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then + fn_print_error2_nl "${commandaction} server: ${remotelocation}: Update required but not completed - check network" + fn_script_log_error "${commandaction} server: ${remotelocation}: Update required but not completed - check network" + else + fn_print_error2_nl "${commandaction} server: ${remotelocation}: Unknown error occured" + fn_script_log_error "${commandaction} server: ${remotelocation}: Unknown error occured" + fi + elif [ "${exitcode}" != "0" ]; then + fn_print_error2_nl "${commandaction} server: ${remotelocation}: Exit code: ${exitcode}" + fn_script_log_error "${commandaction} server: ${remotelocation}: Exit code: ${exitcode}" + else + fn_print_complete_nl "${commandaction} server: ${remotelocation}" + fn_script_log_pass "${commandaction} server: ${remotelocation}" + fi + + if [ "${counter}" -gt "10" ]; then + fn_print_failure_nl "${commandaction} server: ${remotelocation}: Did not complete the download, too many retrys" + fn_script_log_fatal "${commandaction} server: ${remotelocation}: Did not complete the download, too many retrys" + core_exit.sh + fi + done +} + # Emptys contents of the LinuxGSM tmpdir. fn_clear_tmp(){ echo -en "clearing LinuxGSM tmp directory..." diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 8a13cc6ea..ee4807bd5 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -529,3 +529,18 @@ fn_print_ascii_logo(){ echo -e "${lightyellow}LinuxGSM${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y8888Y${default} ${lightyellow}888${default} ${lightyellow}888${default} Y2012P88 Y8888P 888 888" echo -e "" } + +fn_print_restart_warning(){ + fn_print_warn "${selfname} will be restarted" + fn_script_log_warn "${selfname} will be restarted" + totalseconds=3 + for seconds in {3..1}; do + fn_print_warn "${selfname} will be restarted: ${totalseconds}" + totalseconds=$((totalseconds - 1)) + sleep 1 + if [ "${seconds}" == "0" ]; then + break + fi + done + fn_print_warn_nl "${selfname} will be restarted" +} diff --git a/lgsm/functions/core_trap.sh b/lgsm/functions/core_trap.sh index f943c5c33..52c00b107 100644 --- a/lgsm/functions/core_trap.sh +++ b/lgsm/functions/core_trap.sh @@ -7,6 +7,9 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_exit_trap(){ + if [ -z "${exitcode}" ]; then + exitcode=$? + fi echo -e "" core_exit.sh } diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index ec5c60989..0264a7f11 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -68,114 +68,13 @@ fn_install_server_files(){ fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" } -fn_install_server_files_steamcmd(){ - counter="0" - while [ "${counter}" == "0" ]||[ "${exitcode}" != "0" ]; do - counter=$((counter+1)) - if [ -d "${steamcmddir}" ]; then - cd "${steamcmddir}" || exit - fi - if [ "${counter}" -le "10" ]; then - # Attempt 1-4: Standard attempt. - # Attempt 5-6: Validate attempt. - # Attempt 7-8: Validate, delete long name dir. - # Attempt 9-10: Validate, delete long name dir, re-download SteamCMD. - # Attempt 11: Failure. - - if [ "${counter}" -ge "2" ]; then - fn_print_warning_nl "SteamCMD did not complete the download, retrying: Attempt ${counter}" - fn_script_log "SteamCMD did not complete the download, retrying: Attempt ${counter}" - fi - - if [ "${counter}" -ge "7" ]; then - echo -e "Removing $(find "${serverfiles}" -type d -print0 | grep -Ez '[^/]{30}$')" - find "${serverfiles}" -type d -print0 | grep -Ez '[^/]{30}$' | xargs -0 rm -rf - fi - if [ "${counter}" -ge "9" ]; then - rm -rf "${steamcmddir:?}" - check_steamcmd.sh - fi - - # Detects if unbuffer command is available for 32 bit distributions only. - info_distro.sh - if [ "$(command -v stdbuf 2>/dev/null)" ]&&[ "${arch}" != "x86_64" ]; then - unbuffer="stdbuf -i0 -o0 -e0" - fi - - if [ "${counter}" -le "4" ]; then - # If GoldSrc (appid 90) servers. GoldSrc (appid 90) require extra commands. - if [ "${appid}" == "90" ]; then - # If using a specific branch. - if [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" +quit - else - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" +quit - fi - elif [ "${shortname}" == "ac" ]; then - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" +quit - # All other servers. - else - if [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update -beta "${branch}" +quit - else - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" +quit - fi - fi - local exitcode=$? - elif [ "${counter}" -ge "5" ]; then - # If GoldSrc (appid 90) servers. GoldSrc (appid 90) require extra commands. - if [ "${appid}" == "90" ]; then - # If using a specific branch. - if [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" validate +quit - else - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" validate +quit - fi - local exitcode=$? - elif [ "${shortname}" == "ac" ]; then - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" +quit - local exitcode=$? - # All other servers. - else - if [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" validate +quit - else - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" validate +quit - fi - local exitcode=$? - fi - fi - elif [ "${counter}" -ge "11" ]; then - fn_print_failure_nl "SteamCMD did not complete the download, too many retrys" - fn_script_log "SteamCMD did not complete the download, too many retrys" - break - fi - done - - # GoldSrc (appid 90) servers commonly fail to download all the server files required. - # Validating a few of times may reduce the chance of this issue. - if [ "${appid}" == "90" ]; then - fn_print_information_nl "GoldSrc servers commonly fail to download all the server files required. Validating a few of times may reduce the chance of this issue." - counter="0" - while [ "${counter}" -le "4" ]; do - counter=$((counter+1)) - if [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" "${branch}" validate +quit - else - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" validate +quit - fi - local exitcode=$? - done - fi -} - echo -e "" echo -e "${lightyellow}Installing ${gamename} Server${default}" echo -e "=================================" fn_sleep_time if [ "${appid}" ]; then - fn_install_server_files_steamcmd + fn_dl_steamcmd fi if [ "${shortname}" == "ts3" ]; then diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index 869314d60..e8b5c5e5c 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -102,7 +102,7 @@ fn_update_factorio_compare(){ fn_commandname # If server started. else - fn_stop_warning + fn_print_restart_warning exitbypass=1 command_stop.sh fn_commandname @@ -134,21 +134,6 @@ fn_update_factorio_compare(){ fi } -fn_stop_warning(){ - fn_print_warn "this game server will be stopped during update" - fn_script_log_warn "this game server will be stopped during update" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "this game server will be stopped during update: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "this game server will be stopped during update" -} - # The location where the builds are checked and downloaded. remotelocation="factorio.com" diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 62cf6a80c..fad5d903f 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -162,7 +162,7 @@ fn_update_minecraft_compare(){ fn_commandname # If server started. else - fn_stop_warning + fn_print_restart_warning exitbypass=1 command_stop.sh fn_commandname @@ -194,21 +194,6 @@ fn_update_minecraft_compare(){ fi } -fn_stop_warning(){ - fn_print_warn "this game server will be stopped during update" - fn_script_log_warn "this game server will be stopped during update" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "this game server will be stopped during update: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "this game server will be stopped during update" -} - # The location where the builds are checked and downloaded. remotelocation="mojang.com" diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index 1e22053a1..8f6193302 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -129,7 +129,7 @@ fn_update_minecraft_compare(){ fn_commandname # If server started. else - fn_stop_warning + fn_print_restart_warning exitbypass=1 command_stop.sh fn_commandname @@ -155,21 +155,6 @@ fn_update_minecraft_compare(){ fi } -fn_stop_warning(){ - fn_print_warn "this game server will be stopped during update" - fn_script_log_warn "this game server will be stopped during update" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "this game server will be stopped during update: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "this game server will be stopped during update" -} - # The location where the builds are checked and downloaded. remotelocation="minecraft.net" diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index caf6bc57b..6f1250d6c 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -158,7 +158,7 @@ fn_update_mta_compare(){ fn_commandname # If server started. else - fn_stop_warning + fn_print_restart_warning exitbypass=1 command_stop.sh fn_commandname @@ -184,21 +184,6 @@ fn_update_mta_compare(){ fi } -fn_stop_warning(){ - fn_print_warn "this game server will be stopped during update" - fn_script_log_warn "this game server will be stopped during update" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "this game server will be stopped during update: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "this game server will be stopped during update" -} - # The location where the builds are checked and downloaded. remotelocation="linux.mtasa.com" diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 969913ba3..4b60b0cae 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -94,7 +94,7 @@ fn_update_mumble_compare(){ fn_commandname # If server started. else - fn_stop_warning + fn_print_restart_warning exitbypass=1 command_stop.sh fn_commandname @@ -120,21 +120,6 @@ fn_update_mumble_compare(){ fi } -fn_stop_warning(){ - fn_print_warn "this game server will be stopped during update" - fn_script_log_warn "this game server will be stopped during update" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "this game server will be stopped during update: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "this game server will be stopped during update" -} - # The location where the builds are checked and downloaded. remotelocation="mumble.info" diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index cfa6d6aa2..1a3a1cfb3 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -6,38 +6,6 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_steamcmd_dl(){ - info_config.sh - # Detects if unbuffer command is available for 32 bit distributions only. - info_distro.sh - if [ "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then - unbuffer="stdbuf -i0 -o0 -e0" - fi - if [ -d "${steamcmddir}" ]; then - cd "${steamcmddir}" || exit - fi - - # If GoldSrc (appid 90) servers. GoldSrc (appid 90) require extra commands. - if [ "${appid}" == "90" ]; then - # If using a specific branch. - if [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" +quit | tee -a "${lgsmlog}" - else - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" +quit | tee -a "${lgsmlog}" - fi - elif [ "${shortname}" == "ac" ]; then - ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" +quit - # All other servers. - else - if [ -n "${branch}" ]; then - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" +quit | tee -a "${lgsmlog}" - else - ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" +quit | tee -a "${lgsmlog}" - fi - fi - fix.sh -} - fn_update_steamcmd_localbuild(){ # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" @@ -122,15 +90,15 @@ fn_update_steamcmd_compare(){ check_status.sh # If server stopped. if [ "${status}" == "0" ]; then - fn_update_steamcmd_dl + fn_dl_steamcmd # If server started. else - fn_stop_warning + fn_print_restart_warning exitbypass=1 command_stop.sh fn_commandname exitbypass=1 - fn_update_steamcmd_dl + fn_dl_steamcmd exitbypass=1 command_start.sh fn_commandname @@ -190,14 +158,14 @@ fn_appmanifest_check(){ fn_script_log_pass "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" fn_print_info_nl "Forcing update to correct issue" fn_script_log_info "Forcing update to correct issue" - fn_update_steamcmd_dl + fn_dl_steamcmd fi elif [ "${appmanifestfilewc}" -eq "0" ]; then fn_print_error_nl "No appmanifest_${appid}.acf found" fn_script_log_error "No appmanifest_${appid}.acf found" fn_print_info_nl "Forcing update to correct issue" fn_script_log_info "Forcing update to correct issue" - fn_update_steamcmd_dl + fn_dl_steamcmd fn_appmanifest_info if [ "${appmanifestfilewc}" -eq "0" ]; then fn_print_fail_nl "Still no appmanifest_${appid}.acf found" @@ -207,44 +175,29 @@ fn_appmanifest_check(){ fi } -fn_stop_warning(){ - fn_print_warn "this game server will be stopped during update" - fn_script_log_warn "this game server will be stopped during update" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "this game server will be stopped during update: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "this game server will be stopped during update" -} - # The location where the builds are checked and downloaded. remotelocation="SteamCMD" -check_steamcmd.sh +check.sh + +fn_print_dots "${remotelocation}" if [ "${forceupdate}" == "1" ]; then # forceupdate bypasses update checks. - check_status.sh if [ "${status}" != "0" ]; then - fn_stop_warning + fn_print_restart_warning exitbypass=1 command_stop.sh - fn_update_steamcmd_dl + fn_commandname + fn_dl_steamcmd date +%s > "${lockdir}/lastupdate.lock" exitbypass=1 command_start.sh fn_commandname else - fn_update_steamcmd_dl + fn_dl_steamcmd date +%s > "${lockdir}/lastupdate.lock" fi else - fn_print_dots "Checking for update" - fn_print_dots "Checking for update: ${remotelocation}" fn_update_steamcmd_localbuild fn_update_steamcmd_remotebuild fn_update_steamcmd_compare diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index 5bcf14bff..4f1168bb0 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -156,7 +156,7 @@ fn_update_ts3_compare(){ fn_commandname # If server started. else - fn_stop_warning + fn_print_restart_warning exitbypass=1 command_stop.sh fn_commandname @@ -194,21 +194,6 @@ else core_exit.sh fi -fn_stop_warning(){ - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" - fn_script_log_warn "Updating server: SteamCMD: ${selfname} will be stopped during update" - totalseconds=3 - for seconds in {3..1}; do - fn_print_warn "Updating server: SteamCMD: ${selfname} will be stopped during update: ${totalseconds}" - totalseconds=$((totalseconds - 1)) - sleep 1 - if [ "${seconds}" == "0" ]; then - break - fi - done - fn_print_warn_nl "Updating server: SteamCMD: ${selfname} will be stopped during update" -} - # The location where the builds are checked and downloaded. remotelocation="teamspeak.com" From edacc33618766921a14f1e103268835c5c76c12d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 13 Jul 2020 14:05:03 +0100 Subject: [PATCH 77/96] fix(update): allow steamcmd to check for update on beta branches (#2960) --- lgsm/functions/update_steamcmd.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 1a3a1cfb3..3b01ff4b9 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -43,7 +43,12 @@ fn_update_steamcmd_remotebuild(){ find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; fi - remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branchname}/d" | grep -m 1 buildid | tr -cd '[:digit:]') + if [ -n "${branch}" ]; then + remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" -beta "${branch}" +quit | sed '1,/branches/d' | sed "1,/${branchname}/d" | grep -m 1 buildid | tr -cd '[:digit:]') + else + remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branchname}/d" | grep -m 1 buildid | tr -cd '[:digit:]') + fi + if [ "${installer}" != "1" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. From e5ee945480788c17ee76444b042cb914ba29a8c2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 13 Jul 2020 22:50:52 +0100 Subject: [PATCH 78/96] feat(update): add betapassword option for custom steamcmd branches (#2962) --- .../config-lgsm/acserver/_default.cfg | 3 ++ .../config-lgsm/ahl2server/_default.cfg | 1 + .../config-lgsm/ahlserver/_default.cfg | 1 + .../config-lgsm/arkserver/_default.cfg | 1 + .../config-lgsm/arma3server/_default.cfg | 1 + .../config-lgsm/avserver/_default.cfg | 1 + .../config-lgsm/bb2server/_default.cfg | 1 + .../config-lgsm/bbserver/_default.cfg | 1 + .../config-lgsm/bdserver/_default.cfg | 1 + .../config-lgsm/bmdmserver/_default.cfg | 1 + .../config-lgsm/boserver/_default.cfg | 1 + .../config-lgsm/bsserver/_default.cfg | 1 + .../config-lgsm/bt1944server/_default.cfg | 1 + .../config-lgsm/btserver/_default.cfg | 1 + .../config-lgsm/ccserver/_default.cfg | 1 + .../config-lgsm/cmwserver/_default.cfg | 1 + .../config-lgsm/csczserver/_default.cfg | 1 + .../config-lgsm/csgoserver/_default.cfg | 1 + .../config-lgsm/csserver/_default.cfg | 1 + .../config-lgsm/cssserver/_default.cfg | 1 + .../config-lgsm/dabserver/_default.cfg | 1 + .../config-lgsm/dmcserver/_default.cfg | 1 + .../config-lgsm/dodserver/_default.cfg | 1 + .../config-lgsm/dodsserver/_default.cfg | 1 + .../config-lgsm/doiserver/_default.cfg | 1 + .../config-lgsm/dstserver/_default.cfg | 1 + .../config-lgsm/dysserver/_default.cfg | 1 + .../config-lgsm/ecoserver/_default.cfg | 1 + .../config-lgsm/emserver/_default.cfg | 1 + .../config-lgsm/fofserver/_default.cfg | 1 + .../config-lgsm/gesserver/_default.cfg | 1 + .../config-lgsm/gmodserver/_default.cfg | 1 + .../config-lgsm/hl2dmserver/_default.cfg | 1 + .../config-lgsm/hldmserver/_default.cfg | 1 + .../config-lgsm/hldmsserver/_default.cfg | 1 + .../config-lgsm/hwserver/_default.cfg | 1 + .../config-lgsm/insserver/_default.cfg | 1 + .../config-lgsm/inssserver/_default.cfg | 1 + .../config-lgsm/iosserver/_default.cfg | 1 + .../config-lgsm/jc2server/_default.cfg | 1 + .../config-lgsm/jc3server/_default.cfg | 1 + .../config-lgsm/kf2server/_default.cfg | 1 + .../config-lgsm/kfserver/_default.cfg | 1 + .../config-lgsm/l4d2server/_default.cfg | 1 + .../config-lgsm/l4dserver/_default.cfg | 1 + .../config-lgsm/mhserver/_default.cfg | 1 + .../config-lgsm/momserver/_default.cfg | 1 + .../config-lgsm/ndserver/_default.cfg | 1 + .../config-lgsm/nmrihserver/_default.cfg | 1 + .../config-lgsm/ns2cserver/_default.cfg | 1 + .../config-lgsm/ns2server/_default.cfg | 1 + .../config-lgsm/nsserver/_default.cfg | 1 + .../config-lgsm/onsetserver/_default.cfg | 1 + .../config-lgsm/opforserver/_default.cfg | 1 + .../config-lgsm/pcserver/_default.cfg | 1 + .../config-lgsm/pstbsserver/_default.cfg | 1 + .../config-lgsm/pvkiiserver/_default.cfg | 1 + .../config-lgsm/pzserver/_default.cfg | 1 + .../config-lgsm/qlserver/_default.cfg | 1 + .../config-lgsm/ricochetserver/_default.cfg | 1 + .../config-lgsm/roserver/_default.cfg | 1 + .../config-lgsm/rustserver/_default.cfg | 1 + .../config-lgsm/rwserver/_default.cfg | 1 + .../config-lgsm/sbotsserver/_default.cfg | 1 + .../config-lgsm/sbserver/_default.cfg | 4 +- .../config-lgsm/sdtdserver/_default.cfg | 1 + .../config-lgsm/sfcserver/_default.cfg | 1 + .../config-lgsm/solserver/_default.cfg | 1 + .../config-lgsm/squadserver/_default.cfg | 1 + .../config-lgsm/ss3server/_default.cfg | 1 + .../config-lgsm/stserver/_default.cfg | 1 + .../config-lgsm/svenserver/_default.cfg | 1 + .../config-lgsm/terrariaserver/_default.cfg | 1 + .../config-lgsm/tf2server/_default.cfg | 1 + .../config-lgsm/tfcserver/_default.cfg | 1 + .../config-lgsm/tsserver/_default.cfg | 1 + .../config-lgsm/tuserver/_default.cfg | 1 + .../config-lgsm/twserver/_default.cfg | 1 + .../config-lgsm/untserver/_default.cfg | 1 + .../config-lgsm/vsserver/_default.cfg | 1 + .../config-lgsm/wfserver/_default.cfg | 1 + .../config-lgsm/wurmserver/_default.cfg | 1 + .../config-lgsm/zmrserver/_default.cfg | 1 + .../config-lgsm/zpsserver/_default.cfg | 1 + lgsm/functions/core_dl.sh | 26 +++++++++++-- lgsm/functions/update_steamcmd.sh | 37 ++++++++++++------- 86 files changed, 134 insertions(+), 18 deletions(-) diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index 7bc9de9d1..9780bac87 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -110,6 +110,9 @@ sleeptime="0.5" appid="302550" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index c41d0c8f9..9fea1e890 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -138,6 +138,7 @@ querytype="protocol-valve" appid="985050" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 69fc33e0c..77ffdd106 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 11f29d17b..de68135c7 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -114,6 +114,7 @@ sleeptime="0.5" appid="376030" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index 628634140..b67726fa8 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -127,6 +127,7 @@ sleeptime="0.5" appid="233780" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index f4f430e16..06274f8fa 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -109,6 +109,7 @@ sleeptime="0.5" appid="565060" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index e361cb9dc..26410664b 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -117,6 +117,7 @@ sleeptime="0.5" appid="475370" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index 3fdb866c3..a66b1ddd5 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index ec408753e..1c1a43e40 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" appid="817300" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index 61d4c3e4c..91dcd6162 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -117,6 +117,7 @@ sleeptime="0.5" appid="346680" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index 698667c10..ec6169a74 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -110,6 +110,7 @@ sleeptime="0.5" appid="416880" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 69094f8ef..286b552d7 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -121,6 +121,7 @@ sleeptime="0.5" appid="228780" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg index d90b94523..db5f9fec8 100644 --- a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg @@ -109,6 +109,7 @@ sleeptime="0.5" appid="805140" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index 416e77c09..c11530de5 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -104,6 +104,7 @@ sleeptime="0.5" appid="1026340" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index e9f0a70dd..f084a92ac 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="383410" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index 155ef0c17..301226304 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -113,6 +113,7 @@ sleeptime="0.5" appid="220070" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index 8065dbba2..7f30de9f6 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="czero" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 963f873c5..08675ea98 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -137,6 +137,7 @@ sleeptime="0.5" appid="740" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index 584e0ad77..932d8313b 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index 316eb26f8..241180118 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -117,6 +117,7 @@ sleeptime="0.5" appid="232330" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 612ea671f..61fc76d60 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="317800" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index 43fe8e8f1..e49c15fd3 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="dmc" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index 0d1b447c3..cbdb2eb2e 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="dod" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index 572046108..217ee6d2f 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="232290" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index d7916e2b5..1efbeaaf0 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -113,6 +113,7 @@ sleeptime="0.5" appid="462310" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index 7491e7e55..70115d23a 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -115,6 +115,7 @@ sleeptime="0.5" appid="343050" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index 28cc7fb98..17745b42a 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -117,6 +117,7 @@ sleeptime="0.5" appid="17585" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index b4a4b92eb..6bb4f5a42 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -104,6 +104,7 @@ sleeptime="0.5" appid="739590" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 8ab7aefe1..1fd957731 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -117,6 +117,7 @@ sleeptime="0.5" appid="460040" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 49105660c..2eca809ca 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="295230" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/gesserver/_default.cfg b/lgsm/config-default/config-lgsm/gesserver/_default.cfg index a26a5df39..f7dbe2a2f 100644 --- a/lgsm/config-default/config-lgsm/gesserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gesserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="310" # Source 2007 SDK # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index bd254e8b1..b41c31594 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -128,6 +128,7 @@ sleeptime="0.5" appid="4020" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index 22c3da329..c62752607 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="232370" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index 1a17fdd91..3cd16edba 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" appid="90" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index 0036ec7e1..e213d2923 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="255470" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 426d2d250..b3a3b1e71 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -123,6 +123,7 @@ sleeptime="0.5" appid="405100" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index 98817e908..e5446b6a6 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -118,6 +118,7 @@ sleeptime="0.5" appid="237410" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 605a95fbb..1e74410e8 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -119,6 +119,7 @@ sleeptime="0.5" appid="581330" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index acf13f368..dbd190bd2 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="673990" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 81cd0ff5b..276b73d41 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -104,6 +104,7 @@ sleeptime="0.5" appid="261140" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index e3793f805..6c876ab3e 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -104,6 +104,7 @@ sleeptime="0.5" appid="619960" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index 7ad9fc930..dbf80751f 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -110,6 +110,7 @@ sleeptime="0.5" appid="232130" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index f4ef0a7f7..83d253d58 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -116,6 +116,7 @@ sleeptime="0.5" appid="215360" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 4852b2231..425b5ff28 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" appid="222860" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index 158605d2f..e31ad4cb7 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" appid="222840" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 255ecdd04..e5cbea076 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="629800" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index 7e89d5b9f..2e5a42a98 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -110,6 +110,7 @@ sleeptime="0.5" appid="897590" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index 084bcc20b..f7c168a2f 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="111710" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index 261d74fed..94dd089a7 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -117,6 +117,7 @@ sleeptime="0.5" appid="317670" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index 6e857c346..b2db90679 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -119,6 +119,7 @@ sleeptime="0.5" appid="313900" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 01cb086f9..f6d6fbf77 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -123,6 +123,7 @@ sleeptime="0.5" appid="4940" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index 446e8ab8a..ef3f33c32 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index 7401de91a..dbe7f5bfa 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -104,6 +104,7 @@ sleeptime="0.5" appid="1204170" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index a341627a9..a5953dca2 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="gearbox" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index fc74fbe5e..4ebe2e469 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -104,6 +104,7 @@ sleeptime="0.5" appid="332670" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 1a80e7a02..736d83ddf 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -114,6 +114,7 @@ sleeptime="0.5" appid="746200" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 0118ecaa4..7064ce1cc 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="17575" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index da9ae479d..e0a8c90bc 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -108,6 +108,7 @@ sleeptime="0.5" appid="380870" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index 3a5471ad6..60f588d0c 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -106,6 +106,7 @@ sleeptime="0.5" appid="349090" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index b825fb75b..7a49e0bd8 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="ricochet" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 3cbfd5888..19b96eecb 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="223250" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index cf70cdae7..ce86abd7a 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -136,6 +136,7 @@ sleeptime="0.5" appid="258550" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index 95c37ef2d..36fdd4210 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -107,6 +107,7 @@ sleeptime="0.5" appid="339010" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 6145c9905..072036513 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="974130" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index f9ae836d1..aff6f3558 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -111,7 +111,9 @@ sleeptime="0.5" appid="211820" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" -steammaster="flase" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 6269e6150..ba1449654 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -107,6 +107,7 @@ sleeptime="0.5" appid="294420" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index 2203ba14b..736aac82a 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="244310" # Source 2013 SDK # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index d1f853dca..9f34b9732 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -105,6 +105,7 @@ sleeptime="0.5" appid="638500" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 81eb50c01..5e5e6bbfa 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -109,6 +109,7 @@ sleeptime="0.5" appid="403240" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/ss3server/_default.cfg b/lgsm/config-default/config-lgsm/ss3server/_default.cfg index 9032678a4..f4f355ea5 100644 --- a/lgsm/config-default/config-lgsm/ss3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ss3server/_default.cfg @@ -108,6 +108,7 @@ sleeptime="0.5" appid="41080" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index 581c1481a..f1dff6076 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -114,6 +114,7 @@ sleeptime="0.5" appid="600760" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index 72b3acadd..c6f83597e 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" appid="276060" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index 3f941122f..4f8d9b871 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" appid="105600" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index 31eefeb12..cc0da1d9b 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -117,6 +117,7 @@ sleeptime="0.5" appid="232250" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index ccd4988e0..d0cdd1a9d 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="tfc" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index f73622b42..e52209385 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index ff4165e45..ba17f9e13 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -114,6 +114,7 @@ sleeptime="0.5" appid="439660" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index 461c97059..8448da0f8 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" appid="380840" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index ef0fe4c24..f7cc5d989 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -114,6 +114,7 @@ sleeptime="0.5" appid="1110390" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index 1eaa9ff86..5f28ad5c9 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -112,6 +112,7 @@ appid="90" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index 1ddbd7746..c518fde43 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -129,6 +129,7 @@ appid="1136510" appidmod="warfork" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index e131fc28b..dcf980984 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -103,6 +103,7 @@ sleeptime="0.5" appid="402370" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index b22f79fc2..b2271daad 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" appid="244310" # Source 2013 SDK # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index 279f7258a..41cea0c00 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -117,6 +117,7 @@ sleeptime="0.5" appid="17505" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="true" diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 6cd481506..a6521ac03 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -22,7 +22,14 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_dl_steamcmd(){ fn_print_start_nl "${remotelocation}" fn_script_log_info "${commandaction} server: ${remotelocation}" - + if [ -n "${branch}" ]; then + echo -e "Branch: ${branch}" + fn_script_log_info "Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + echo -e "Branch password: ${betapassword}" + fn_script_log_info "Branch password: ${betapassword}" + fi if [ -d "${steamcmddir}" ]; then cd "${steamcmddir}" || exit fi @@ -52,21 +59,27 @@ fn_dl_steamcmd(){ # If GoldSrc (appid 90) servers. GoldSrc (appid 90) require extra commands. if [ "${appid}" == "90" ]; then # If using a specific branch. - if [ -n "${branch}" ]; then + if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then + ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" + elif [ -n "${branch}" ]; then ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" else ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" fi # Force Windows Platform type. elif [ "${shortname}" == "ac" ]; then - if [ -n "${branch}" ]; then + if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then + ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" + elif [ -n "${branch}" ]; then ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" else ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" fi # All other servers. else - if [ -n "${branch}" ]; then + if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then + ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" + elif [ -n "${branch}" ]; then ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" else ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${validate} +quit | tee -a "${lgsmlog}" "${steamcmdlog}" @@ -91,6 +104,11 @@ fn_dl_steamcmd(){ fn_print_failure_nl "${commandaction} server: ${remotelocation}: Two-factor authentication failure" fn_script_log_fatal "${commandaction} server: ${remotelocation}: Two-factor authentication failure" core_exit.sh + # Incorrect Branch password + elif [ -n "$(grep "Password check for AppId" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} server: ${remotelocation}: betapassword is incorrect" + fn_script_log_fatal "${commandaction} server: ${remotelocation}: betapassword is incorrect" + core_exit.sh # Update did not finish. elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then fn_print_error2_nl "${commandaction} server: ${remotelocation}: Update required but not completed - check network" diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 3b01ff4b9..7543e3443 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -13,12 +13,9 @@ fn_update_steamcmd_localbuild(){ # Uses appmanifest to find local build. localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) - # Set branch for updateinfo. - IFS=' ' read -ra branchsplits <<< "${branch}" - if [ "${#branchsplits[@]}" -gt 1 ]; then - branchname="${branchsplits[1]}" - else - branchname="public" + # Set branch to public if no custom branch. + if [ -z "${branch}" ]; then + branch="public" fi # Checks if localbuild variable has been set. @@ -43,10 +40,12 @@ fn_update_steamcmd_remotebuild(){ find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; fi - if [ -n "${branch}" ]; then - remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" -beta "${branch}" +quit | sed '1,/branches/d' | sed "1,/${branchname}/d" | grep -m 1 buildid | tr -cd '[:digit:]') + if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then + remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" -beta "${branch}" -betapassword "${betapassword}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]') + elif [ -n "${branch}" ]; then + remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" -beta "${branch}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]') else - remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branchname}/d" | grep -m 1 buildid | tr -cd '[:digit:]') + remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]') fi if [ "${installer}" != "1" ]; then @@ -78,17 +77,23 @@ fn_update_steamcmd_compare(){ echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" echo -e "* Remote build: ${green}${remotebuild}${default}" - if [ -v "${branch}" ]; then + if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi + if [ -n "${betapassword}" ]; then + echo -e "* Branch password: ${betapassword}" + fi echo -e "https://steamdb.info/app/${appid}/" echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuild}" - if [ -v "${branch}" ]; then + if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi + if [ -n "${betapassword}" ]; then + fn_script_log_info "Branch password: ${betapassword}" + fi fn_script_log_info "${localbuild} > ${remotebuild}" unset updateonstart @@ -117,17 +122,23 @@ fn_update_steamcmd_compare(){ echo -e "No update available" echo -e "* Local build: ${green}${localbuild}${default}" echo -e "* Remote build: ${green}${remotebuild}${default}" - if [ -v "${branch}" ]; then + if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi + if [ -n "${betapassword}" ]; then + echo -e "* Branch password: ${betapassword}" + fi echo -e "https://steamdb.info/app/${appid}/" echo -en "\n" fn_script_log_info "No update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuild}" - if [ -v "${branch}" ]; then + if [ -n "${branch}" ]; then fn_script_log_info "Branch: ${branch}" fi + if [ -n "${betapassword}" ]; then + fn_script_log_info "Branch password: ${betapassword}" + fi fi } From a3da62fb1a6d963dd4df5c9a7c5d00a1e21773f2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 13 Jul 2020 23:04:18 +0100 Subject: [PATCH 79/96] feat(stop): add end option to graceful stop (#2963) --- lgsm/config-default/config-lgsm/acserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/ahl2server/_default.cfg | 1 + lgsm/config-default/config-lgsm/ahlserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/arkserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/arma3server/_default.cfg | 1 + lgsm/config-default/config-lgsm/avserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/bb2server/_default.cfg | 1 + lgsm/config-default/config-lgsm/bbserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/bdserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/bf1942server/_default.cfg | 1 + lgsm/config-default/config-lgsm/bfvserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/bmdmserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/boserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/bsserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/bt1944server/_default.cfg | 1 + lgsm/config-default/config-lgsm/btserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/ccserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/cmwserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/cod2server/_default.cfg | 1 + lgsm/config-default/config-lgsm/cod4server/_default.cfg | 1 + lgsm/config-default/config-lgsm/codserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/coduoserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/codwawserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/csczserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/csgoserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/csserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/cssserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/dabserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/dmcserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/dodserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/dodsserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/doiserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/dstserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/dysserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/ecoserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/emserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/etlserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/fctrserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/fofserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/gesserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/gmodserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/hldmserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/hldmsserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/hwserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/insserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/inssserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/iosserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/jc2server/_default.cfg | 1 + lgsm/config-default/config-lgsm/jc3server/_default.cfg | 1 + lgsm/config-default/config-lgsm/kf2server/_default.cfg | 1 + lgsm/config-default/config-lgsm/kfserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/l4d2server/_default.cfg | 1 + lgsm/config-default/config-lgsm/l4dserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/mcbserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/mcserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/mhserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/mohaaserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/momserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/mtaserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/mumbleserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/ndserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/nmrihserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/ns2cserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/ns2server/_default.cfg | 1 + lgsm/config-default/config-lgsm/nsserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/onsetserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/opforserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/pcserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/pstbsserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/pzserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/q2server/_default.cfg | 1 + lgsm/config-default/config-lgsm/q3server/_default.cfg | 1 + lgsm/config-default/config-lgsm/qlserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/qwserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/ricochetserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/roserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/rtcwserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/rustserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/rwserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/sampserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/sbotsserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/sbserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/sdtdserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/sfcserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/sof2server/_default.cfg | 1 + lgsm/config-default/config-lgsm/solserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/squadserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/ss3server/_default.cfg | 1 + lgsm/config-default/config-lgsm/stserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/svenserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/terrariaserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/tf2server/_default.cfg | 1 + lgsm/config-default/config-lgsm/tfcserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/ts3server/_default.cfg | 1 + lgsm/config-default/config-lgsm/tsserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/tuserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/twserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/untserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/ut2k4server/_default.cfg | 1 + lgsm/config-default/config-lgsm/ut3server/_default.cfg | 1 + lgsm/config-default/config-lgsm/ut99server/_default.cfg | 1 + lgsm/config-default/config-lgsm/utserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/vsserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/wetserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/wfserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/wurmserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/zmrserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/zpsserver/_default.cfg | 1 + lgsm/functions/command_stop.sh | 2 ++ tests/tests_defaultcfg/defaultcfg_1.txt | 1 + 112 files changed, 113 insertions(+) diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index 9780bac87..0faa375da 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -125,6 +125,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index 9fea1e890..39d99e9e5 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -122,6 +122,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 77ffdd106..2a611c2e6 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index de68135c7..9dc41afc2 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -129,6 +129,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index b67726fa8..3c57f1ff2 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -142,6 +142,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index 06274f8fa..c3cce8c2b 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -124,6 +124,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="10" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index 26410664b..0c8ef08fa 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -132,6 +132,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index a66b1ddd5..6397af14c 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index 1c1a43e40..d4bfabb8e 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -126,6 +126,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index 04bcef9b3..2bf084b18 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -110,6 +110,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg index d0b7215c5..99d1555d8 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -110,6 +110,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index 91dcd6162..12cabed62 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -132,6 +132,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index ec6169a74..9e8e28000 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -125,6 +125,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index 286b552d7..81111150b 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -136,6 +136,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg index db5f9fec8..50d397812 100644 --- a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg @@ -124,6 +124,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index c11530de5..f10520f31 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -119,6 +119,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="7" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index f084a92ac..bd9eb1c5d 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index 301226304..36d9555ce 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -128,6 +128,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index a686ea45f..6ec7c17d3 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -113,6 +113,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index 027c52509..3ca19c411 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -113,6 +113,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 74e186466..a9e97f086 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -113,6 +113,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index b4e16cfff..390a92c25 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -113,6 +113,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index aeecf8f7b..3906ee496 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -113,6 +113,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index 7f30de9f6..90e1eb623 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 08675ea98..d4071272a 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -152,6 +152,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index 932d8313b..c41093ddf 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index 241180118..4e911f857 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -132,6 +132,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index 61fc76d60..9074e5f78 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index e49c15fd3..6e2ce40af 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index cbdb2eb2e..499c029a5 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index 217ee6d2f..10a1e8cf3 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index 1efbeaaf0..436221dfb 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -128,6 +128,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index 70115d23a..1d49c64e1 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -130,6 +130,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index 17745b42a..bd33808b9 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -132,6 +132,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index 6bb4f5a42..714731b65 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -119,6 +119,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index 1fd957731..15ccbb9a1 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -132,6 +132,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index add0f74b6..126eb855b 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -107,6 +107,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index fddab05ee..6ba03ee02 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -118,6 +118,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 2eca809ca..3438cb5d0 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/gesserver/_default.cfg b/lgsm/config-default/config-lgsm/gesserver/_default.cfg index f7dbe2a2f..db7889630 100644 --- a/lgsm/config-default/config-lgsm/gesserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gesserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index b41c31594..3b5026350 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -143,6 +143,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index c62752607..0e60c1662 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index 3cd16edba..67cf1f0c8 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -126,6 +126,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index e213d2923..6ec069c74 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index b3a3b1e71..bc832521a 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -138,6 +138,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index e5446b6a6..78c789a4d 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -133,6 +133,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 1e74410e8..41c7a4810 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -134,6 +134,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index dbd190bd2..0c935b5ad 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 276b73d41..f593f28bc 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -119,6 +119,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index 6c876ab3e..cdfb17e54 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -119,6 +119,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index dbf80751f..2cd1e0cca 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -125,6 +125,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 83d253d58..1332c3ebb 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -131,6 +131,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 425b5ff28..e877ea0b1 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -126,6 +126,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index e31ad4cb7..1b8cd88ba 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -126,6 +126,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index 839f5a9af..df50e3af1 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -110,6 +110,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="5" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index a49465f45..788bbab2b 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -116,6 +116,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="5" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index e5cbea076..9791aee22 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index 1f82fe0c4..010b97ab2 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index 2e5a42a98..1ebe2f227 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -125,6 +125,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index dc6aac282..111a1b350 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="4" ## Query mode diff --git a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg index 6afe760ae..341177009 100644 --- a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index f7c168a2f..df0201849 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index 94dd089a7..160c4d58f 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -132,6 +132,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index b2db90679..a778aded5 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -134,6 +134,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="6" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index f6d6fbf77..d4340a0fa 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -138,6 +138,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="6" ## Query mode diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index ef3f33c32..a53da058d 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index dbe7f5bfa..247bf3fbe 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -119,6 +119,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index a5953dca2..45a7347ab 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index 4ebe2e469..6496cf1be 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -119,6 +119,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 736d83ddf..d8dc2888d 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -129,6 +129,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 7064ce1cc..3294b2043 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index e0a8c90bc..a823e14d1 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -123,6 +123,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index 832f641c7..0d28d1155 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index 6d28f4caf..115a093aa 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index 60f588d0c..ffe409802 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -121,6 +121,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index 59cdcc0f1..db81ef4d4 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index 7a49e0bd8..8ab59f487 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index 19b96eecb..c87fcb7a7 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index 93b9ce3fe..c73ae99cb 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index ce86abd7a..93771879d 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -151,6 +151,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index 36fdd4210..e771ca8e2 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -122,6 +122,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 67331ee39..7d3c5bde9 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 072036513..095f54417 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index aff6f3558..2476ddf0f 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -126,6 +126,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index ba1449654..5067aae26 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -122,6 +122,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="8" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index 736aac82a..866194cc9 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index 090330f49..408497753 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index 9f34b9732..4a80b1634 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -118,6 +118,7 @@ betapassword="" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 5e5e6bbfa..c0ef25dea 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -124,6 +124,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ss3server/_default.cfg b/lgsm/config-default/config-lgsm/ss3server/_default.cfg index f4f355ea5..ec008dd8d 100644 --- a/lgsm/config-default/config-lgsm/ss3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ss3server/_default.cfg @@ -123,6 +123,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index f1dff6076..e0210738d 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -129,6 +129,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index c6f83597e..a422cda8d 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -126,6 +126,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index 4f8d9b871..1ec6f491a 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -126,6 +126,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="7" ## Query mode diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index cc0da1d9b..97748938a 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -132,6 +132,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index d0cdd1a9d..2c1a1d4a5 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index 3a511b394..4f604d700 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -113,6 +113,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index e52209385..150d9ad46 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index ba17f9e13..555ccc397 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -129,6 +129,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index 8448da0f8..2be04f44b 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -126,6 +126,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index f7cc5d989..92fc25b4a 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -129,6 +129,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index 9c4164c72..91bad0924 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index b42227859..b9015d5de 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -127,6 +127,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index caab7ffea..713623690 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -111,6 +111,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index 40d6cc526..c60cb1a50 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -115,6 +115,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index 5f28ad5c9..7f2ef3b3b 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="9" ## Query mode diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index 54ee3d25b..67a3ceff0 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -107,6 +107,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index c518fde43..8fa5ec1f8 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -112,6 +112,7 @@ sleeptime="0.5" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index dcf980984..4c95a5409 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -118,6 +118,7 @@ steammaster="false" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="2" ## Query mode diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index b2271daad..e0204ff07 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -127,6 +127,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index 41cea0c00..69d5383f5 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -132,6 +132,7 @@ steammaster="true" # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end stopmode="3" ## Query mode diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 085f9996a..58e28a9ca 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -231,6 +231,8 @@ fn_stop_graceful_select(){ fn_stop_graceful_goldsrc elif [ "${stopmode}" == "10" ]; then fn_stop_graceful_avorion + elif [ "${stopmode}" == "11" ]; then + fn_stop_graceful_cmd "end" 30 fi } diff --git a/tests/tests_defaultcfg/defaultcfg_1.txt b/tests/tests_defaultcfg/defaultcfg_1.txt index 505b6b1f0..88f6adf5c 100644 --- a/tests/tests_defaultcfg/defaultcfg_1.txt +++ b/tests/tests_defaultcfg/defaultcfg_1.txt @@ -41,6 +41,7 @@ # 8: 7 Days to Die # 9: GoldSrc # 10: Avorion +# 11: end ## Game Server Details # Do not edit #### Directories #### From f020669697c3982f559b7edb96babff74ec4b090 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 13 Jul 2020 23:34:33 +0100 Subject: [PATCH 80/96] feat(details): add appid and branch password to details (#2964) --- lgsm/functions/info_messages.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index d423e0f4a..cde94d319 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -187,11 +187,21 @@ fn_info_message_gameserver(){ echo -e "${lightblue}Server Description:\t${default}${serverdescription}" fi + # Appid + if [ -n "${appid}" ]; then + echo -e "${lightblue}App ID:\t${default}${appid}" + fi + # Branch if [ -n "${branch}" ]; then echo -e "${lightblue}Branch:\t${default}${branch}" fi + # Beta Password + if [ -n "${betapassword}" ]; then + echo -e "${lightblue}Beta Password:\t${default}${betapassword}" + fi + # Server ip if [ "${multiple_ip}" == "1" ]; then echo -e "${lightblue}Server IP:\t${default}NOT SET" From 0573131baa1e85b2d21c4cad3f3a4175ab948352 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 14 Jul 2020 11:18:51 +0100 Subject: [PATCH 81/96] resolve some bugs in CONTRIBUTING.md --- CONTRIBUTING.md | 54 ++++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2cadd7e54..7a48eef1b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,9 +6,9 @@ The following is a set of guidelines for contributing to LinuxGSM, which are hos ## Table of Contents * [Contributing to LinuxGSM](#contributing-to-linuxgsm) - * [Table of Contents](#table-of-contents) - * [Code of Conduct](#code-of-conduct) - * [Bug/Enhancement Contributions](#---bug-enhancement-contributions---) +* [Table of Contents](#table-of-contents) +* [Code of Conduct](#code-of-conduct) +* [Bug/Enhancement Contributions](#---bug-enhancement-contributions---) * [Reporting Bugs](#--reporting-bugs) * [Before Submitting A Bug Report](#before-submitting-a-bug-report) * [How Do I Submit A (Good) Bug Report?](#how-do-i-submit-a--good--bug-report-) @@ -41,11 +41,11 @@ This project and everyone participating in it are governed by the [LinuxGSM Code This section guides you through submitting a bug report for LinuxGSM. Following these guidelines help maintainers and the community understand your report 📝, reproduce the behaviour💻, and find any related reports 🔎. -Before creating bug reports, please check [this list](https://github.com/GameServerManagers/linuxgsm/blob/master/CONTRIBUTING.md#before-submitting-a-bug-report) as you might find out that you don’t need to create one. When you are creating a bug report, please [include as many details as possible](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#how-do-i-submit-a-good-bug-report). Fill out [the required template](https://github.com/atom/.github/blob/master/.github/ISSUE_TEMPLATE/bug_report.md), the information it asks for helps us resolve issues faster. +Before creating bug reports, please check [this list](https://github.com/GameServerManagers/linuxgsm/blob/master/CONTRIBUTING.md#before-submitting-a-bug-report) as you might find out that you don’t need to create one. When you are creating a bug report, please [include as many details as possible](https://github.com/GameServerManagers/linuxgsm/blob/master/CONTRIBUTING.md#how-do-i-submit-a-good-bug-report). Fill out [the required template]([https://github.com/GameServerManagers/LinuxGSM/issues/new/choose](https://github.com/GameServerManagers/LinuxGSM/issues/new/choose)), the information it asks for helps us resolve issues faster. #### Before Submitting A Bug Report -* **Check the** [**documentation**](https://docs.linuxgsm.com/%5D(https://docs.linuxgsm.com/))**.** You might be able to find the cause of the problem and fix things yourself. +* **Check the [documentation](https://docs.linuxgsm.com).** You might be able to find the cause of the problem and fix things yourself. * **Check that the problem is not related to** [**support page**](https://linuxgsm/com/support) for links to other support options. * **Check the** [**support page**](https://linuxgsm/com/support) for links to other support options. * **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one. @@ -83,19 +83,23 @@ Features are tracked as [GitHub issues](https://guides.github.com/features/issue ### 🎮 Game Server Requests -This section guides you through submitting a game server request for LinuxGSM, Following these guidelines help maintainers and the community understand your game server request 📝 - +This section guides you through submitting a game server request for LinuxGSM, Following these guidelines help maintainers and the community understand your game server request 📝. #### Before Submitting a Game Server Request -* **Check for existing** [**game server requests**](https://github.com/GameServerManagers/LinuxGSM/labels/type%3A%20game%20server%20request) to see if the new game server has already been suggested. If it has **and if the new game server is still open**, give it a thumbs up instead of opening a new one. +* **Check for existing** [**game server requests**](https://github.com/GameServerManagers/LinuxGSM/labels/type%3A%20game%20server%20request) to see if the new game server has already been suggested. If it has **and if the new game server is still open**, give it a thumbs. +* **Check the game server is supported on Linux**, this does not include Wine servers which we do not support. +#### How Do I Submit A (Good) Game Server Request? +* The title should be as follows: **[Server Request] Game Name** +* **Provide Steam App ID** if applicable +* **Supply any documentation/how-to guides** for the game server. ### 🎮 Game Server Specific Issues LinuxGSM is a management script that acts as a wrapper around game servers. These game servers are developed by different game developers such as Valve, Epic and Facepunch to name a few. -LinuxGSM has no control over the development and limited knowledge issues directly relating to the game servers themselves. The same also applies for any mods, add-ons, maps etc. +LinuxGSM has no control over the development and limited knowledge of issues directly relating to the game servers themselves. The same also applies for any mods, add-ons, maps etc. -If there is an issue with a specific game server or mod the best action may be to contact the game/mod developers on there support forums. If it is unclear some community members might be able to help. +If there is an issue with a specific game server or mod the best action may be to contact the game/mod developers on there support forums. If it is unclear some community members should be able to help. A [list](https://docs.linuxgsm.com/support/game-server) of known game developer forums is available on the [LinuxGSM docs](https://docs.linuxgsm.com/support/game-server). @@ -112,7 +116,7 @@ The process described here has several goals: Please follow these steps to have your contribution considered by the maintainers: -1. Follow all instructions in [the template](https://github.com/GameServerManagers/LinuxGSM/blob/master/.github/pull_request_template.md) +1. Follow all check-list in [the template](https://github.com/GameServerManagers/LinuxGSM/blob/master/.github/pull_request_template.md) 2. Follow the [style guides](#styleguides) 3. After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing @@ -130,24 +134,24 @@ If applied, this commit will _your subject line here_ For example: -* If applied, this commit will _refactor subsystem X for readability_ -* If applied, this commit will _update getting started documentation_ -* If applied, this commit will _remove deprecated methods_ -* If applied, this commit will _release version 1.0.0_ -* If applied, this commit will _merge pull request #123 from user/branch_ +* If applied, this commit will **refactor subsystem X for readability** +* If applied, this commit will **update getting started documentation** +* If applied, this commit will **remove deprecated methods** +* If applied, this commit will **release version 1.0.0** +* If applied, this commit will **merge pull request #123 from user/branch** Notice how this doesn’t work for the other non-imperative forms: -* If applied, this commit will _fixed bug with Y_ -* If applied, this commit will _change the behaviour of X_ -* If applied, this commit will _more fixes for broken stuff_ -* If applied, this commit will _sweet new API methods_ +* If applied, this commit will **fixed bug with Y** +* If applied, this commit will **change the behaviour of X** +* If applied, this commit will **more fixes for broken stuff** +* If applied, this commit will **sweet new API methods** -Below is an example of the subject line for a pull request. +Below is an example of the subject line for a pull request: -feat(alerts): add slack support to alerts +**feat(alerts): add slack support to alerts** -fix(csgoserver): remove SteamCMD auth requirement 32-bit workaround +**fix(csgoserver): remove SteamCMD auth requirement 32-bit workaround** ### Testing @@ -155,7 +159,7 @@ fix(csgoserver): remove SteamCMD auth requirement 32-bit workaround When a Pull Request is submitted, a series of status check tests are conducted. These tests will asses the code quality, complete CI tests etc. To get your PR merged these status checks must pass. #### Test Environment -It is recommended that you have a testing environment available to test your code during development. To test your own cod you must change some variables within the `linuxgsm.sh` file. This will force the use of your own code branch. +It is recommended that you have a testing environment available to test your code during development. To test your own code you must change some variables within the `linuxgsm.sh` file. This will force the use of your own code branch. ```bash ## GitHub Branch Select # Allows for the use of different function files @@ -183,7 +187,7 @@ As well as code contributions it is possible to contribute by writing and improv ### Documentation Styleguide -LinuxGSM has various documentation available to assist users and developers. LinuxGSM primarily uses [GitBook](http://gitbook.com/) which uses the [Markdown](https://www.markdownguide.org/) document standard. LinuxGSM uses [Codacy](https://app.codacy.com/manual/GameServerManagers/LinuxGSM/dashboard) to analyse any Pull Requests to give you feedback on markup standards. +LinuxGSM has various documentation available to assist [users](https://docs.linuxgsm.com) and [developers](dev-docs.linuxgsm.com). LinuxGSM primarily uses [GitBook](http://gitbook.com/) which uses the [Markdown](https://www.markdownguide.org/) document standard. LinuxGSM uses [Codacy](https://app.codacy.com/manual/GameServerManagers/LinuxGSM/dashboard) to analyse any Pull Requests to give you feedback on markup standards. ## Issue and Pull Request Labels From b6eacc5620e0cb424b437dcbf4142e5dc457138f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 14 Jul 2020 11:27:37 +0100 Subject: [PATCH 82/96] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b0f05ec1..554cec031 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ There are a various ways to get support, check out the [support](https://linuxgs ## :heart: Donate -If you would like to [donate](https://linuxgsm.com/donate) to the project there are several ways you can, via [GitHub Sponsors](https://github.com/sponsors/dgibbs64), [Patreon](https://www.patreon.com/dgibbs) and [PayPal](https://www.paypal.me/dgibbs64). I would like to thank everyone who has previously sent a donation. Since 2012 LinuxGSM has been steadily growing with new servers, features and improvements added regularly. +If you would like to [donate](https://linuxgsm.com/donate) to the project there are several ways you can, via [GitHub Sponsors](https://github.com/sponsors/dgibbs64) and [PayPal](https://www.paypal.me/dgibbs64). I would like to thank everyone who has previously sent a donation. Since 2012 LinuxGSM has been steadily growing with new servers, features and improvements added regularly. ## Contributors From 69c8550c13749bac3e6d55b36252e472637f9bad Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 14 Jul 2020 11:32:07 +0100 Subject: [PATCH 83/96] Update table of contents --- CONTRIBUTING.md | 52 +++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a48eef1b..3310ea3c6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,32 +5,34 @@ The following is a set of guidelines for contributing to LinuxGSM, which are hosted in the [GameServerManagers Organization](https://github.com/gameservermanagers) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. ## Table of Contents -* [Contributing to LinuxGSM](#contributing-to-linuxgsm) -* [Table of Contents](#table-of-contents) -* [Code of Conduct](#code-of-conduct) -* [Bug/Enhancement Contributions](#---bug-enhancement-contributions---) - * [Reporting Bugs](#--reporting-bugs) - * [Before Submitting A Bug Report](#before-submitting-a-bug-report) - * [How Do I Submit A (Good) Bug Report?](#how-do-i-submit-a--good--bug-report-) - * [Suggesting Features](#--suggesting-features) - * [Before Submitting An Feature Suggestion](#before-submitting-an-feature-suggestion) - * [How Do I Submit A (Good) Feature Suggestion?](#how-do-i-submit-a--good--feature-suggestion-) - * [Game Server Requests](#---game-server-requests) - * [Before Submitting a Game Server Request](#before-submitting-a-game-server-request) - * [How Do I Submit A (Good) Game Server Suggestion?](#how-do-i-submit-a--good--feature-suggestion--1) - * [Game Server Specific Issues](#---game-server-specific-issues) - * [Code Contributions](#---code-contributions) - * [Pull Requests](#pull-requests) - * [Pull Request naming convention](#pull-request-naming-convention) - * [Testing](#testing) - * [Pull Request Status Checks](#pull-request-status-checks) - * [Test Environment](#test-environment) - * [Styleguides](#-wine-glass--styleguides) - * [Git Commit Messages](#git-commit-messages) - * [BASH Styleguide](#bash-styleguide) - * [Document Contributions](#-blue-book--document-contributions) - * [Documentation Styleguide](#documentation-styleguide) + + [Contributing to LinuxGSM](#contributing-to-linuxgsm) + * [Table of Contents](#table-of-contents) + * [Code of Conduct](#code-of-conduct) + * [🎉 Bug/Enhancement Contributions 🐛](#---bug-enhancement-contributions---) + + [🐛Reporting Bugs](#--reporting-bugs) + - [Before Submitting A Bug Report](#before-submitting-a-bug-report) + - [How Do I Submit A (Good) Bug Report?](#how-do-i-submit-a--good--bug-report-) + + [🎉Suggesting Features](#--suggesting-features) + - [Before Submitting An Feature Suggestion](#before-submitting-an-feature-suggestion) + - [How Do I Submit A (Good) Feature Suggestion?](#how-do-i-submit-a--good--feature-suggestion-) + + [🎮 Game Server Requests](#---game-server-requests) + - [Before Submitting a Game Server Request](#before-submitting-a-game-server-request) + - [How Do I Submit A (Good) Game Server Request?](#how-do-i-submit-a--good--game-server-request-) + + [🎮 Game Server Specific Issues](#---game-server-specific-issues) + * [💻 Code Contributions](#---code-contributions) + + [Pull Requests](#pull-requests) + - [Pull Request naming convention](#pull-request-naming-convention) + + [Testing](#testing) + - [Pull Request Status Checks](#pull-request-status-checks) + - [Test Environment](#test-environment) + + [:wine_glass: Styleguides](#-wine-glass--styleguides) + - [Git Commit Messages](#git-commit-messages) + - [BASH Styleguide](#bash-styleguide) + * [:blue_book: Document Contributions](#-blue-book--document-contributions) + + [Documentation Styleguide](#documentation-styleguide) * [Issue and Pull Request Labels](#issue-and-pull-request-labels) + ## Code of Conduct This project and everyone participating in it are governed by the [LinuxGSM Code of Conduct](https://github.com/GameServerManagers/linuxgsm/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behaviour to [daniel.gibbs@linuxgsm.com](mailto:daniel.gibbs@linuxgsm.com). From 97e794430145e21666663c0fc169b729f02f0066 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 14 Jul 2020 11:36:53 +0100 Subject: [PATCH 84/96] Update CONTRIBUTING.md --- CONTRIBUTING.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3310ea3c6..bcb1caf7f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,18 +9,18 @@ The following is a set of guidelines for contributing to LinuxGSM, which are hos [Contributing to LinuxGSM](#contributing-to-linuxgsm) * [Table of Contents](#table-of-contents) * [Code of Conduct](#code-of-conduct) - * [🎉 Bug/Enhancement Contributions 🐛](#---bug-enhancement-contributions---) - + [🐛Reporting Bugs](#--reporting-bugs) + * [🎉 Bug/Enhancement Contributions 🐛](#bug-enhancement-contributions) + + [🐛Reporting Bugs](#reporting-bugs) - [Before Submitting A Bug Report](#before-submitting-a-bug-report) - [How Do I Submit A (Good) Bug Report?](#how-do-i-submit-a--good--bug-report-) - + [🎉Suggesting Features](#--suggesting-features) + + [🎉Suggesting Features](#suggesting-features) - [Before Submitting An Feature Suggestion](#before-submitting-an-feature-suggestion) - [How Do I Submit A (Good) Feature Suggestion?](#how-do-i-submit-a--good--feature-suggestion-) - + [🎮 Game Server Requests](#---game-server-requests) + + [🎮 Game Server Requests](#game-server-requests) - [Before Submitting a Game Server Request](#before-submitting-a-game-server-request) - [How Do I Submit A (Good) Game Server Request?](#how-do-i-submit-a--good--game-server-request-) - + [🎮 Game Server Specific Issues](#---game-server-specific-issues) - * [💻 Code Contributions](#---code-contributions) + + [🎮 Game Server Specific Issues](#game-server-specific-issues) + * [💻 Code Contributions](#code-contributions) + [Pull Requests](#pull-requests) - [Pull Request naming convention](#pull-request-naming-convention) + [Testing](#testing) From 70ab6667c6d42c385efeca3667e90edfbf256680 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 15 Jul 2020 21:19:46 +0100 Subject: [PATCH 85/96] New README.md header logo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 554cec031..7e8c789d3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@


- LinuxGSM + LinuxGSM

[![LinuxGSM](https://img.shields.io/badge/-LinuxGSM-2b2b2b.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACsAAABACAYAAACDbo5ZAAAGD0lEQVR4AcWYa2wUVRvHz75c2vJ2disXoUBEVIioRAx%2BMIFA1IRwUS6KCCiIKBrvhEYiiGm5iBgk8QOGEgUUDYTttmVZWFr2UmwURS6iYAoCtmisElSsdHdbkT7%2BTzoNy%2BGc2dm54C%2F5Rdkz85x%2FZ86ZOXOYXYhIg3Phx%2FA4PAcv6f%2Btg5vhHJjP3EcZsgsshufJHH%2FAJbDztQ7aG35J1vgCXn%2BtgvrgEbLHYei9FmE3kDOUuh10OGwjZ7gEh7kZ9gNyllK3gnrg7%2BQs56DHjbCDyB0GuRF2ArnDeDfCziF3mO1G2FfJHRa4EXYpuUOxG2GXkzuUuBH2TXKH5W6ELSV3eM%2BNsOUk5yQcAY8p2uvgSPitor3MjbB1UOQXOFBvHwpbhPYWOExvL4SNUOQ7p4P2JTlzhOPmCu0vCu1PQpE2WOhk2MdJjk9y7HNwP1wEPUJbAcmZ6WTYrYolnifbxZBiibnFySHQCkUaLdY7C0V4%2FT5OhF1JcuIW6%2B0lOcvsBi2Ezao3j8Ov7Quwj52w60jNKIs1R5GatVaDDoEXSU4D7GSxbidYT3IuwjusFK0mNUVMwaZNNbl%2B%2F87hoVCom0HthaQmnG3QB0lNPcxlCvz%2B0GtlZTuorCxYYlA%2FDzbY%2FnrAgV3hCVLzCDMgEAi9wMMi9IIM%2FUwnNXWwi5mwRaSmmmXA798xq%2F3Khp420VeE1LyS6eQeBhttSXgzywCCToIUCOyYZvKLOWWwkdfd6ORVpGYJM0F5efDe9mEQHGty2BWTmhVGO4PNBmOoKzMBxmo%2FhD25dWvljSbD5hjMkb9gT9lJq63Mzi1bKkbjloc7xBWtwiRrDASCVRi%2FRxA8if%2BvrawMTzYI%2FACpeUv2KFFtDcUyTKilCHcis8G1Ga7wHpLzG8wVFs1K7jaeUKHZfIxmkj9%2FM4S9x9RGiMEudo0QbCVu9Xqn5PWEwLUk5%2FP0iaXac53I0kAH9Sau4m54lo%2FdTMfyekLYKQZ7ub34AbMMlmw5irC2VYTN0fuVMYMf8JHxJ7L7YYXAlSRnI2%2F8RtH4siTsDMz%2BZ5yS15OEXUxyDjGD1%2BvEq8MG16CDzY6JepKwT6geYbzxb0XjGMl7vwGSgzZIwo4nOa1M8Yr9Afb%2Fj8L21%2FsXaeaNZ2A6KTiEASph%2F0vF80cn4tokqu79fzfCUk2vfF4%2FFdFGEjGPHvg2yWrsDG%2F4%2BqpZB8jPOiXjWk0y5iXdM3XhKUvxBTA9UvHuvNPh%2Bzb%2BWj10z6nwuHWBbQFMvNCjKnn7qd1jS%2Fnx9VX3b6jC%2BbwOr5eMe3%2B83IcW4%2F3qgT%2BUTbA9srGaiHsn8AKiF6Ld%2FxF%2FOx6eeAJXabvK78MTTornNMd6XJTVR7%2Fj9bBjhFxV%2FMc1kJOAy2AeA%2FgrV4mFVDZFCqm8rEJ6qysCAWqK9iaztRJRbWXa4moFTELOav7jY%2FqAvoXp0Gc9NX7bIZl17%2FZl0rC1wRLeno0NvP%2B0CTcYNnS8wW6CtzNANaxzKqo9hRNOQ8rGo7tmSsMe2zWdt2frqVRcm5s2fofCgawDNHRNxnyfqgsYez4y4ADCjRM9H73hsNWafILTQdaFiSTj%2BQ%2FxA6yH7d%2BCmR8XbYr0a7VTF2N4siSsb5qdos3R6%2FjGxpULFfw7EfORnbrI9TAToX0sD40%2F2ylcGdh2Rdhg%2BSf2gka9jRTqK9%2BGwgHz7RTfVbHxirDhivdthYUvMRX8aYAD9lstvi%2B0aDL2DUZ0eCBUNNVG0IP65FLTWqPdiqdC0koHTVXe7iyNRG23QotBEy1RbTAzQyrmnYUT2rLsoA13JpcB4eVC2daBM1g2JGLekmwf5On7EJfngfZTNnVSce8bFjaTmQdvs%2FXmO%2FJVpoXdx3RSUe9O00Fj3nUdy0RLgRHiHXOPGW1h2uKZ07c9rG%2Bxyefp23pQeyBIEQoavYlakrG8fnrY5yHn2fbxXzAgw7m8bT5zkkSk4C7cpmOK21esB%2FXAQ5DzFfTo43%2BF%2FDzf0eZ4wZ3MDSjMcvD6nIeOahGgia%2FyU3HforTPkWkwnakdn0cI9jqfbPjD%2FuQLJr6644snlgX%2FApOMoyd1R5%2FxAAAAAElFTkSuQmCC)](https://linuxgsm.com) [![Build Status](https://travis-ci.com/GameServerManagers/LinuxGSM.svg?branch=master)](https://travis-ci.com/GameServerManagers/LinuxGSM) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3e98be27840043a090c3ab6e35db44b0)](https://app.codacy.com/app/GameServerManagers/LinuxGSM?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Grade_Dashboard) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/9ef77095e98a43618ddd57381f86b4be)](https://www.codacy.com/manual/GameServerManagers/LinuxGSM?utm_source=github.com&utm_medium=referral&utm_content=GameServerManagers/LinuxGSM&utm_campaign=Badge_Coverage) [![Backup Repo](https://github.com/GameServerManagers/LinuxGSM/workflows/Backup%20Repo/badge.svg)](https://bitbucket.org/GameServerManagers/linuxgsm) [![Discord](https://discordapp.com/api/guilds/127498813903601664/widget.png?style=shield)](https://linuxgsm.com/discord) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/GameServerManagers/LinuxGSM/blob/master/LICENSE) [![made-with-bash](https://img.shields.io/badge/-Made%20with%20Bash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MDg2QTAyQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkE3MDg2QTAzQUZCMzExRTVBMkQxRDMzMkJDMUQ4RDk3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTcwODZBMDBBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTcwODZBMDFBRkIzMTFFNUEyRDFEMzMyQkMxRDhEOTciLz4gPC9yZGY6RGVzY3JpcHRpb24%2BIDwvcmRmOlJERj4gPC94OnhtcG1ldGE%2BIDw%2FeHBhY2tldCBlbmQ9InIiPz6lm45hAAADkklEQVR42qyVa0yTVxzGn7d9Wy03MS2ii8s%2BeokYNQSVhCzOjXZOFNF4jx%2BMRmPUMEUEqVG36jo2thizLSQSMd4N8ZoQ8RKjJtooaCpK6ZoCtRXKpRempbTv5ey83bhkAUphz8fznvP8znn%2B%2F3NeEEJgNBoRRSmz0ub%2FfuxEacBg%2FDmYtiCjgo5NG2mBXq%2BH5I1ogMRk9Zbd%2BQU2e1ML6VPLOyf5tvBQ8yT1lG10imxsABm7SLs898GTpyYynEzP60hO3trHDKvMigUwdeaceacqzp7nOI4n0SSIIjl36ao4Z356OV07fSQAk6xJ3XGg%2BLCr1d1OYlVHp4eUHPnerU79ZA%2F1kuv1JQMAg%2BE4O2P23EumF3VkvHprsZKMzKwbRUXFEyTvSIEmTVbrysp%2BWr8wfQHGK6WChVa3bKUmdWou%2BjpArdGkzZ41c1zG%2Fu5uGH4swzd561F%2BuhIT4%2BLnSuPsv9%2BJKIpjNr9dXYOyk7%2FBZrcjIT4eCnoKgedJP4BEqhG77E3NKP31FO7cfQA5K0dSYuLgz2TwCWJSOBzG6crzKK%2BohNfni%2Bx6OMUMMNe%2Fgf7ocbw0v0acKg6J8Ql0q%2BT%2FAXR5PNi5dz9c71upuQqCKFAD%2BYhrZLEAmpodaHO3Qy6TI3NhBpbrshGtOWKOSMYwYGQM8nJzoFJNxP2HjyIQho4PewK6hBktoDcUwtIln4PjOWzflQ%2Be5yl0yCCYgYikTclGlxadio%2BBQCSiW1UXoVGrKYwH4RgMrjU1HAB4vR6LzWYfFUCKxfS8Ftk5qxHoCUQAUkRJaSEokkV6Y%2F%2BJUOC4hn6A39NVXVBYeNP8piH6HeA4fPbpdBQV5KOx0QaL1YppX3Jgk0TwH2Vg6S3u%2BdB91%2B%2FpuNYPYFl5uP5V7ZqvsrX7jxqMXR6ff3gCQSTzFI0a1TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/) From a941499479a291247b8690e0bebe8f287a939c17 Mon Sep 17 00:00:00 2001 From: Nathan <4490380+Grimston@users.noreply.github.com> Date: Fri, 17 Jul 2020 03:09:50 +0800 Subject: [PATCH 86/96] feat(rustserver): add support for Rust + app (#2965) --- lgsm/config-default/config-lgsm/rustserver/_default.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 93771879d..46192dddb 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -13,6 +13,7 @@ ip="0.0.0.0" port="28015" rconport="28016" +appport=28082 rconpassword="CHANGE_ME" rconweb="1" # Value is: 1 for Facepunch's web panel; 0 for RCON tools like Rusty or Rustadmin servername="Rust" @@ -42,7 +43,7 @@ else # Keep randomness of the number if not set conditionalsalt="" fi -parms="-batchmode +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" ${conditionalseed} ${conditionalsalt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\"" +parms="-batchmode +server.ip ${ip} +server.port ${port} +app.port ${appport} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" ${conditionalseed} ${conditionalsalt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\"" } #### LinuxGSM Settings #### From 4861d1374d5506ec28b631926d14ec5c30ce1e59 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 16 Jul 2020 21:29:15 +0100 Subject: [PATCH 87/96] feat(rustserver): console now has an output (#2966) --- lgsm/config-default/config-lgsm/rustserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 46192dddb..595cf3864 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -43,7 +43,7 @@ else # Keep randomness of the number if not set conditionalsalt="" fi -parms="-batchmode +server.ip ${ip} +server.port ${port} +app.port ${appport} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" ${conditionalseed} ${conditionalsalt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\"" +parms="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" ${conditionalseed} ${conditionalsalt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile" } #### LinuxGSM Settings #### From c35ba0179b0d9f18ea4ca656653eacf19dd85e96 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 16 Jul 2020 22:22:34 +0100 Subject: [PATCH 88/96] Release v20.4.0 --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 849c76472..b832a8e1b 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.3" +version="v20.4.0" shortname="core" gameservername="core" commandname="CORE" From f4b2e8b4fd21fb409af59786de887b407efce56f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 16 Jul 2020 22:26:23 +0100 Subject: [PATCH 89/96] Release v20.4.0 Release v20.4.0 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 4b0387194..c0be8d8cc 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v20.3.3" +modulesversion="v20.4.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 849c76472..b832a8e1b 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.3" +version="v20.4.0" shortname="core" gameservername="core" commandname="CORE" From 6508caad67a68d936fdf0bc2131143793f8c029a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 16 Jul 2020 23:16:52 +0100 Subject: [PATCH 90/96] fix(details): suppress jq error --- lgsm/functions/info_distro.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index c50953cdc..87c73aa3e 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -263,9 +263,9 @@ fi if [ "$(command -v jq 2>/dev/null)" ]; then if [ "${ip}" ]&&[ "${port}" ]; then if [ "${steammaster}" == "true" ]; then - masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${ip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null) + masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${ip}':'${port}'&format=json' | jq '.response.servers[]?|.addr' | wc -l 2>/dev/null) if [ "${masterserver}" == "0" ]; then - masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null) + masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]?|.addr' | wc -l 2>/dev/null) fi if [ "${masterserver}" == "0" ]; then displaymasterserver="false" From 64e06d37064dea91cb77b0b2ee32222bc81ad148 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 17 Jul 2020 10:20:31 +0100 Subject: [PATCH 91/96] update sponsor url --- lgsm/functions/install_header.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_header.sh b/lgsm/functions/install_header.sh index f67860dd4..dae205018 100644 --- a/lgsm/functions/install_header.sh +++ b/lgsm/functions/install_header.sh @@ -15,6 +15,6 @@ echo -e "by Daniel Gibbs" echo -e "${lightblue}Game:${default} ${gamename}" echo -e "${lightblue}Website:${default} https://linuxgsm.com" echo -e "${lightblue}Contributors:${default} https://linuxgsm.com/contrib" -echo -e "${lightblue}Donate:${default} https://linuxgsm.com/donate" +echo -e "${lightblue}Sponsor:${default} https://linuxgsm.com/sponsor" echo -e "=================================" fn_sleep_time From d327e93880fa5a2edf643514b6132805c0df1cec Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 17 Jul 2020 22:45:03 +0100 Subject: [PATCH 92/96] fix(log): allow logs to correctly display primary command (#2969) --- lgsm/functions/alert.sh | 2 +- lgsm/functions/check_last_update.sh | 2 +- lgsm/functions/check_version.sh | 2 +- lgsm/functions/command_backup.sh | 14 ++++++-------- lgsm/functions/command_console.sh | 13 ++++++------- lgsm/functions/command_debug.sh | 12 +++++------- lgsm/functions/command_details.sh | 10 ++++------ lgsm/functions/command_dev_clear_functions.sh | 10 ++++------ lgsm/functions/command_dev_debug.sh | 10 ++++------ lgsm/functions/command_dev_detect_deps.sh | 10 ++++------ lgsm/functions/command_dev_detect_glibc.sh | 10 ++++------ lgsm/functions/command_dev_detect_ldd.sh | 10 ++++------ lgsm/functions/command_dev_query_raw.sh | 10 ++++------ lgsm/functions/command_donate.sh | 10 ++++------ lgsm/functions/command_fastdl.sh | 10 ++++------ lgsm/functions/command_install.sh | 12 +++++------- .../functions/command_install_resources_mta.sh | 10 ++++------ lgsm/functions/command_mods_install.sh | 10 ++++------ lgsm/functions/command_mods_remove.sh | 12 +++++------- lgsm/functions/command_mods_update.sh | 10 ++++------ lgsm/functions/command_monitor.sh | 12 +++++------- lgsm/functions/command_postdetails.sh | 10 ++++------ lgsm/functions/command_restart.sh | 12 +++++------- lgsm/functions/command_start.sh | 12 +++++------- lgsm/functions/command_stop.sh | 10 ++++------ lgsm/functions/command_test_alert.sh | 10 ++++------ lgsm/functions/command_ts3_server_pass.sh | 18 ++++++++---------- lgsm/functions/command_update.sh | 10 ++++------ lgsm/functions/command_update_linuxgsm.sh | 10 ++++------ lgsm/functions/command_validate.sh | 14 ++++++-------- lgsm/functions/command_wipe.sh | 14 ++++++-------- lgsm/functions/compress_unreal2_maps.sh | 10 ++++------ lgsm/functions/compress_ut99_maps.sh | 10 ++++------ lgsm/functions/core_messages.sh | 17 +++++++++++++++++ lgsm/functions/fix_kf.sh | 8 ++++---- lgsm/functions/fix_kf2.sh | 4 ++-- lgsm/functions/fix_ro.sh | 8 ++++---- lgsm/functions/fix_ut2k4.sh | 8 ++++---- lgsm/functions/fix_ut3.sh | 4 ++-- lgsm/functions/fix_wurm.sh | 4 ++-- lgsm/functions/install_modules.sh | 2 +- lgsm/functions/update_factorio.sh | 8 ++++---- lgsm/functions/update_minecraft.sh | 10 +++++----- lgsm/functions/update_minecraft_bedrock.sh | 12 ++++++------ lgsm/functions/update_mta.sh | 8 ++++---- lgsm/functions/update_mumble.sh | 6 +++--- lgsm/functions/update_steamcmd.sh | 8 ++++---- lgsm/functions/update_ts3.sh | 8 ++++---- 48 files changed, 207 insertions(+), 249 deletions(-) diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 236ca6461..704a3f3eb 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -99,7 +99,7 @@ fn_alert_log if [ "${postalert}" == "on" ]&&[ -n "${postalert}" ]; then exitbypass=1 command_postdetails.sh - fn_commandname + fn_firstcommand_reset elif [ "${postalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "More Info not enabled" fn_script_log_warn "More Info alerts not enabled" diff --git a/lgsm/functions/check_last_update.sh b/lgsm/functions/check_last_update.sh index 08343e560..99253d749 100644 --- a/lgsm/functions/check_last_update.sh +++ b/lgsm/functions/check_last_update.sh @@ -20,6 +20,6 @@ if [ -f "${lockdir}/lastupdate.lock" ]&&[ "${status}" != "0" ]; then fn_print_info "${selfname} has not been restarted since last update" fn_script_log_info "${selfname} has not been restarted since last update" command_restart.sh - fn_commandname + fn_firstcommand_reset fi fi diff --git a/lgsm/functions/check_version.sh b/lgsm/functions/check_version.sh index a0b0bc50c..15f0284bb 100644 --- a/lgsm/functions/check_version.sh +++ b/lgsm/functions/check_version.sh @@ -16,5 +16,5 @@ if [ -n "${modulesversion}" ]&&[ -n "${version}" ]&&[ "${version}" != "${modules fn_sleep_time fn_script_log_error "LinuxGSM Version mismatch: ${selfname}: ${version}: modules: ${modulesversion}" command_update_linuxgsm.sh - fn_commandname + fn_firstcommand_reset fi diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 620820932..dbf97a857 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: Creates a .tar.gz file in the backup directory. -fn_commandname(){ - commandname="BACKUP" - commandaction="Backing up" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="BACKUP" +commandaction="Backing up" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set check.sh @@ -77,7 +75,7 @@ fn_backup_stop_server(){ startserver="1" exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset fi } @@ -252,7 +250,7 @@ fn_backup_start_server(){ if [ -n "${startserver}" ]; then exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset fi } diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index 02040d5c5..d998e594d 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -4,12 +4,11 @@ # Website: https://linuxgsm.com # Description: Gives access to the server tmux console. -fn_commandname(){ - commandname="CONSOLE" - commandaction="Access console" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname + +commandname="CONSOLE" +commandaction="Access console" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set check.sh fn_print_header @@ -38,7 +37,7 @@ else if fn_prompt_yn "Do you want to start the server?" Y; then exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset fi fi diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 4addb86b5..d8a8a1cba 100644 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Runs the server without tmux and directly from the terminal. -fn_commandname(){ - commandname="DEBUG" - commandaction="Debuging" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="DEBUG" +commandaction="Debuging" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set # Trap to remove lockfile on quit. fn_lockfile_trap(){ @@ -91,7 +89,7 @@ fn_print_info_nl "Stopping any running servers" fn_script_log_info "Stopping any running servers" exitbypass=1 command_stop.sh -fn_commandname +fn_firstcommand_reset unset exitbypass fn_print_dots "Starting debug" fn_script_log_info "Starting debug" diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index b90f8a6f5..9680255f4 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: Displays server information. -fn_commandname(){ - commandname="DETAILS" - commandaction="Viewing details" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="DETAILS" +commandaction="Viewing details" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set # Run checks and gathers details to display. check.sh diff --git a/lgsm/functions/command_dev_clear_functions.sh b/lgsm/functions/command_dev_clear_functions.sh index 935ebb4ef..96a637c52 100644 --- a/lgsm/functions/command_dev_clear_functions.sh +++ b/lgsm/functions/command_dev_clear_functions.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Deletes the contents of the functions dir. -fn_commandname(){ - commandname="DEV-CLEAR-MODULES" - commandaction="Clearing modules" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="DEV-CLEAR-MODULES" +commandaction="Clearing modules" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set echo -e "=================================" echo -e "Clear Functions" diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh index 4a076df9e..e959509cd 100644 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/functions/command_dev_debug.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Dev only: Enables debugging log to be saved to dev-debug.log. -fn_commandname(){ - commandname="DEV-DEBUG" - commandaction="Developer debug" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="DEV-DEBUG" +commandaction="Developer debug" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_reset if [ -f "${rootdir}/.dev-debug" ]; then rm "${rootdir:?}/.dev-debug" diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index 089aa9af3..d2fa00fcc 100644 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Detects dependencies the server binary requires. -fn_commandname(){ - commandname="DEV-DETECT-DEPS" - commandaction="Developer detect deps" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="DEV-DETECT-DEPS" +commandaction="Developer detect deps" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set echo -e "=================================" echo -e "Dependencies Checker" diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh index c2feae0c9..8f5d6e5a8 100644 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ b/lgsm/functions/command_dev_detect_glibc.sh @@ -5,12 +5,10 @@ # Description: Automatically detects the version of GLIBC that is required. # Can check a file or directory recursively. -fn_commandname(){ - commandname="DEV-DETECT-GLIBC" - commandaction="Developer detect glibc" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="DEV-DETECT-GLIBC" +commandaction="Developer detect glibc" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set echo -e "=================================" echo -e "glibc Requirements Checker" diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/functions/command_dev_detect_ldd.sh index 60766cce5..e6ddfb09f 100644 --- a/lgsm/functions/command_dev_detect_ldd.sh +++ b/lgsm/functions/command_dev_detect_ldd.sh @@ -5,12 +5,10 @@ # Description: Automatically detects required deps using ldd. # Can check a file or directory recursively. -fn_commandname(){ - commandname="DEV-DETECT-LDD" - commandaction="Developer detect ldd" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="DEV-DETECT-LDD" +commandaction="Developer detect ldd" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set echo -e "=================================" echo -e "Shared Object dependencies Checker" diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index 00005c22c..84efe0da9 100644 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Raw gamedig output of the server. -fn_commandname(){ - commandname="DEV-QUERY-RAW" - commandaction="Developer query raw" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="DEV-QUERY-RAW" +commandaction="Developer query raw" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set check.sh info_config.sh diff --git a/lgsm/functions/command_donate.sh b/lgsm/functions/command_donate.sh index 0483e4aa1..18e6dce5a 100644 --- a/lgsm/functions/command_donate.sh +++ b/lgsm/functions/command_donate.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Shows ways to donate. -fn_commandname(){ - commandname="DONATE" - commandaction="Donate" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="DONATE" +commandaction="Donate" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set fn_print_ascii_logo echo -e "${lightyellow}Support LinuxGSM${default}" diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index a4d06d5e6..19ffb79fd 100644 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: Creates a FastDL directory. -fn_commandname(){ - commandname="FASTDL" - commandaction="Fastdl" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="FASTDL" +commandaction="Fastdl" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set check.sh diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index 23fdd3179..2437116d3 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: Overall function for the installer. -fn_commandname(){ - commandname="INSTALL" - commandaction="Installing" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="INSTALL" +commandaction="Installing" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set check.sh if [ "$(whoami)" = "root" ]; then @@ -45,7 +43,7 @@ else install_ts3db.sh elif [ "${shortname}" == "mta" ]; then command_install_resources_mta.sh - fn_commandname + fn_firstcommand_reset fi fix.sh diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 4c641dcef..503948a3c 100644 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Installs the default resources for Multi Theft Auto. -fn_commandname(){ - commandname="DEFAULT-RESOURCES" - commandaction="Default Resources" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="DEFAULT-RESOURCES" +commandaction="Default Resources" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set fn_install_resources(){ echo -e "" diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh index 48bf116b3..369f5f967 100644 --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/functions/command_mods_install.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: List and installs available mods along with mods_list.sh and mods_core.sh. -fn_commandname(){ - commandname="MODS-INSTALL" - commandaction="Installing mods" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="MODS-INSTALL" +commandaction="Installing mods" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set check.sh mods_core.sh diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh index b2062333e..7cbba8a71 100644 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/functions/command_mods_remove.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: Uninstall mods along with mods_list.sh and mods_core.sh. -fn_commandname(){ - commandname="MODS-REMOVE" - commandaction="Removing mods" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="MODS-REMOVE" +commandaction="Removing mods" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set check.sh mods_core.sh @@ -126,7 +124,7 @@ if [ "${engine}" == "unity3d" ]&&[[ "${modprettyname}" == *"Oxide"* ]]; then fn_script_log "Validating to restore original ${gamename} files replaced by Oxide" exitbypass="1" command_validate.sh - fn_commandname + fn_firstcommand_reset unset exitbypass fi echo -e "${modprettyname} removed" diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh index d6cd15e70..9328a493d 100644 --- a/lgsm/functions/command_mods_update.sh +++ b/lgsm/functions/command_mods_update.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: Updates installed mods along with mods_list.sh and mods_core.sh. -fn_commandname(){ - commandname="MODS-UPDATE" - commandaction="Updating mods" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="MODS-UPDATE" +commandaction="Updating mods" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set check.sh mods_core.sh diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index adc2be363..89524ab91 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -6,12 +6,10 @@ # Description: Monitors server by checking for running processes # then passes to gamedig and gsquery. -fn_commandname(){ - commandname="MONITOR" - commandaction="Monitoring" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="MONITOR" +commandaction="Monitoring" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set fn_monitor_check_lockfile(){ # Monitor does not run it lockfile is not found. @@ -173,7 +171,7 @@ for queryattempt in {1..5}; do alert="restartquery" alert.sh command_restart.sh - fn_commandname + fn_firstcommand_reset core_exit.sh fi elif [ "${querymethod}" == "gamedig" ]; then diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index 0d40b6a0b..11ac44649 100644 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: Strips sensitive information out of Details output -fn_commandname(){ - commandname="POST-DETAILS" - commandaction="Posting details" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="POST-DETAILS" +commandaction="Posting details" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set # Set posttarget to the appropriately-defined post destination. diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh index 47fa163a8..9498c618c 100644 --- a/lgsm/functions/command_restart.sh +++ b/lgsm/functions/command_restart.sh @@ -4,16 +4,14 @@ # Website: https://linuxgsm.com # Description: Restarts the server. -fn_commandname(){ - commandname="MODS-INSTALL" - commandaction="Restarting" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="MODS-INSTALL" +commandaction="Restarting" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set info_config.sh exitbypass=1 command_stop.sh command_start.sh -fn_commandname +fn_firstcommand_reset core_exit.sh diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index c78bcc158..48cb02e12 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: Starts the server. -fn_commandname(){ - commandname="START" - commandaction="Starting" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="START" +commandaction="Starting" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set fn_start_teamspeak3(){ if [ ! -f "${servercfgfullpath}" ]; then @@ -191,7 +189,7 @@ if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateon exitbypass=1 unset updateonstart command_update.sh - fn_commandname + fn_firstcommand_reset fi fn_print_dots "${servername}" diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 58e28a9ca..439967fd0 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: Stops the server. -fn_commandname(){ - commandname="STOP" - commandaction="Stopping" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="STOP" +commandaction="Stopping" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set # Attempts graceful shutdown by sending 'CTRL+c'. fn_stop_graceful_ctrlc(){ diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh index 969c648ca..625d5c6c2 100644 --- a/lgsm/functions/command_test_alert.sh +++ b/lgsm/functions/command_test_alert.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Sends a test alert. -fn_commandname(){ - commandname="TEST-ALERT" - commandaction="Sending Alert" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="TEST-ALERT" +commandaction="Sending Alert" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set fn_print_dots "${servername}" check.sh diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh index ba25747cc..c97d98805 100644 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: Changes TS3 serveradmin password. -fn_commandname(){ - commandname="CHANGE-PASSWORD" - commandaction="Changing password" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="CHANGE-PASSWORD" +commandaction="Changing password" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set fn_serveradmin_password_prompt(){ fn_print_header @@ -31,7 +29,7 @@ fn_serveradmin_password_set(){ ts3serverpass="1" exitbypass="1" command_start.sh - fn_commandname + fn_firstcommand_reset fn_print_ok_nl "New password applied" fn_script_log_pass "New ServerAdmin password applied" } @@ -43,16 +41,16 @@ if [ "${status}" != "0" ]; then # Stop any running server. exitbypass="1" command_stop.sh - fn_commandname + fn_firstcommand_reset fn_serveradmin_password_set parms="serveradmin_password=\"${newpassword}\" inifile=\"${servercfgfullpath}\" > /dev/null 2>&1" ts3serverpass="0" command_restart.sh - fn_commandname + fn_firstcommand_reset else fn_serveradmin_password_set command_stop.sh - fn_commandname + fn_firstcommand_reset fi core_exit.sh diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index b6254937a..2a6c23d57 100644 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Handles updating of servers. -fn_commandname(){ - commandname="UPDATE" - commandaction="Updating" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="UPDATE" +commandaction="Updating" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set fn_print_dots "" check.sh diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index e4028cf18..072fc8817 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Deletes the functions dir to allow re-downloading of functions from GitHub. -fn_commandname(){ - commandname="UPDATE-LGSM" - commandaction="Updating LinuxGSM" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="UPDATE-LGSM" +commandaction="Updating LinuxGSM" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set check.sh diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 1ddded9c0..690a86b43 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Runs a server validation. -fn_commandname(){ - commandname="VALIDATE" - commandaction="Validating" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="VALIDATE" +commandaction="Validating" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set fn_validate(){ fn_print_warn "Validate might overwrite some customised files" @@ -38,11 +36,11 @@ if [ "${status}" != "0" ]; then fn_print_restart_warning exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset fn_validate exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset else fn_validate fi diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 96e10a98f..5c17d6d5f 100644 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -5,12 +5,10 @@ # Website: https://linuxgsm.com # Description: Wipes server data, useful after updates for some games like Rust -fn_commandname(){ - commandname="WIPE" - commandaction="Wiping" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="WIPE" +commandaction="Wiping" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set # Provides an exit code upon error. fn_wipe_exit_code(){ @@ -198,11 +196,11 @@ if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ fn_stop_warning exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset fn_wipe_server_files exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset else fn_wipe_server_files fi diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh index e08dd666f..82d94d4d8 100644 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Compresses unreal maps. -fn_commandname(){ - commandname="MAP-COMPRESSOR" - commandaction="Compressing maps" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="MAP-COMPRESSOR" +commandaction="Compressing maps" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set check.sh fn_print_header diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh index e475c466b..39153ba3e 100644 --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/functions/compress_ut99_maps.sh @@ -4,12 +4,10 @@ # Website: https://linuxgsm.com # Description: Compresses unreal maps. -fn_commandname(){ - commandname="MAP-COMPRESSOR" - commandaction="Compressing maps" - functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -} -fn_commandname +commandname="MAP-COMPRESSOR" +commandaction="Compressing maps" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set check.sh fn_print_header diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index ee4807bd5..c467c2a4d 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -544,3 +544,20 @@ fn_print_restart_warning(){ done fn_print_warn_nl "${selfname} will be restarted" } + +# Functions below are used to ensure that logs and UI correctly reflect the command it is actually running. +# Useful when a command has to call upon another command causing the other command to overrite commandname variables + +# Used to remember the command that ran first. +fn_firstcommand_set(){ + if [ -z "${firstcommandname}" ]; then + firstcommandname="${commandname}" + firstcommandaction="${commandaction}" + fi +} + +# Used to reset commandname variables to the command the script ran first. +fn_firstcommand_reset(){ + commandname="${firstcommandname}" + commandaction="${firstcommandaction}" +} diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh index a745094b0..c4a294515 100644 --- a/lgsm/functions/fix_kf.sh +++ b/lgsm/functions/fix_kf.sh @@ -21,15 +21,15 @@ echo -e "forcing server restart..." fn_sleep_time exitbypass=1 command_start.sh -fn_commandname +fn_firstcommand_reset sleep 5 exitbypass=1 command_stop.sh -fn_commandname +fn_firstcommand_reset exitbypass=1 command_start.sh -fn_commandname +fn_firstcommand_reset sleep 5 exitbypass=1 command_stop.sh -fn_commandname +fn_firstcommand_reset diff --git a/lgsm/functions/fix_kf2.sh b/lgsm/functions/fix_kf2.sh index 99e96543a..e826dea2a 100644 --- a/lgsm/functions/fix_kf2.sh +++ b/lgsm/functions/fix_kf2.sh @@ -14,8 +14,8 @@ fn_print_information "starting ${gamename} server to generate configs." fn_sleep_time exitbypass=1 command_start.sh -fn_commandname +fn_firstcommand_reset sleep 10 exitbypass=1 command_stop.sh -fn_commandname +fn_firstcommand_reset diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh index 902fed7fe..c9254aa64 100644 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/functions/fix_ro.sh @@ -24,15 +24,15 @@ echo -e "forcing server restart..." fn_sleep_time exitbypass=1 command_start.sh -fn_commandname +fn_firstcommand_reset sleep 5 exitbypass=1 command_stop.sh -fn_commandname +fn_firstcommand_reset exitbypass=1 command_start.sh -fn_commandname +fn_firstcommand_reset sleep 5 exitbypass=1 command_stop.sh -fn_commandname +fn_firstcommand_reset diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh index 07805d42b..cc1621815 100644 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -21,15 +21,15 @@ echo -e "forcing server restart." fn_sleep_time exitbypass=1 command_start.sh -fn_commandname +fn_firstcommand_reset sleep 5 exitbypass=1 command_stop.sh -fn_commandname +fn_firstcommand_reset exitbypass=1 command_start.sh -fn_commandname +fn_firstcommand_reset sleep 5 exitbypass=1 command_stop.sh -fn_commandname +fn_firstcommand_reset diff --git a/lgsm/functions/fix_ut3.sh b/lgsm/functions/fix_ut3.sh index ad9b3db4e..402683bf1 100644 --- a/lgsm/functions/fix_ut3.sh +++ b/lgsm/functions/fix_ut3.sh @@ -14,8 +14,8 @@ fn_print_information "starting ${gamename} server to generate configs." fn_sleep_time exitbypass=1 command_start.sh -fn_commandname +fn_firstcommand_reset sleep 10 exitbypass=1 command_stop.sh -fn_commandname +fn_firstcommand_reset diff --git a/lgsm/functions/fix_wurm.sh b/lgsm/functions/fix_wurm.sh index 40325d729..dfba3afdc 100644 --- a/lgsm/functions/fix_wurm.sh +++ b/lgsm/functions/fix_wurm.sh @@ -18,10 +18,10 @@ if [ ! -d "${serverfiles}/Creative" ]; then fixbypass=1 exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset sleep 10 exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset unset parmsbypass fi diff --git a/lgsm/functions/install_modules.sh b/lgsm/functions/install_modules.sh index 39729fd23..cc516bea0 100644 --- a/lgsm/functions/install_modules.sh +++ b/lgsm/functions/install_modules.sh @@ -14,4 +14,4 @@ cp "${tmpdir}/LinuxGSM-master/lgsm/functions"/*.sh "${functionsdir}" cp "${tmpdir}/LinuxGSM-master/lgsm/functions"/*.py "${functionsdir}" chmod +x "${functionsdir}"/* command_update_linuxgsm.sh -fn_commandname +fn_firstcommand_reset diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index e8b5c5e5c..ae4bdbaa5 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -96,21 +96,21 @@ fn_update_factorio_compare(){ fn_update_factorio_dl exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset # If server started. else fn_print_restart_warning exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset exitbypass=1 fn_update_factorio_dl exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset fi date +%s > "${lockdir}/lastupdate.lock" alert="update" diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index fad5d903f..b74b71aab 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -44,10 +44,10 @@ fn_update_minecraft_localbuild(){ fn_script_log_info "Forcing server restart" exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset totalseconds=0 # Check again, allow time to generate logs. while [ ! -f "${serverfiles}/logs/latest.log" ]; do @@ -159,18 +159,18 @@ fn_update_minecraft_compare(){ command_start.sh exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset # If server started. else fn_print_restart_warning exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset exitbypass=1 fn_update_minecraft_dl exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset fi date +%s > "${lockdir}/lastupdate.lock" alert="update" diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index 8f6193302..8c90d5efb 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -47,16 +47,16 @@ fn_update_minecraft_localbuild(){ if [ "${status}" == "0" ]; then exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset sleep 3 exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset # If server started. else exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset fi fi @@ -126,18 +126,18 @@ fn_update_minecraft_compare(){ command_start.sh exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset # If server started. else fn_print_restart_warning exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset exitbypass=1 fn_update_minecraft_dl exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset fi date +%s > "${lockdir}/lastupdate.lock" alert="update" diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 6f1250d6c..d15d9457b 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -40,7 +40,7 @@ fn_update_mta_localbuild(){ command_stop.sh exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset totalseconds=0 # Check again, allow time to generate logs. while [ ! -f "${serverfiles}/mods/deathmatch/logs/server.log" ]; do @@ -155,18 +155,18 @@ fn_update_mta_compare(){ command_start.sh exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset # If server started. else fn_print_restart_warning exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset exitbypass=1 fn_update_mta_dl exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset fi date +%s > "${lockdir}/lastupdate.lock" alert="update" diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 4b60b0cae..6b3fd19d0 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -91,18 +91,18 @@ fn_update_mumble_compare(){ command_start.sh exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset # If server started. else fn_print_restart_warning exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset exitbypass=1 fn_update_mumble_dl exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset fi date +%s > "${lockdir}/lastupdate.lock" alert="update" diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 7543e3443..348147b03 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -106,12 +106,12 @@ fn_update_steamcmd_compare(){ fn_print_restart_warning exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset exitbypass=1 fn_dl_steamcmd exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset fi date +%s > "${lockdir}/lastupdate.lock" alert="update" @@ -203,12 +203,12 @@ if [ "${forceupdate}" == "1" ]; then fn_print_restart_warning exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset fn_dl_steamcmd date +%s > "${lockdir}/lastupdate.lock" exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset else fn_dl_steamcmd date +%s > "${lockdir}/lastupdate.lock" diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index 4f1168bb0..290ddf4d0 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -44,7 +44,7 @@ fn_update_ts3_localbuild(){ command_stop.sh exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset totalseconds=0 # Check again, allow time to generate logs. while [ ! -d "${serverfiles}/logs" ]||[ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; do @@ -153,18 +153,18 @@ fn_update_ts3_compare(){ command_start.sh exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset # If server started. else fn_print_restart_warning exitbypass=1 command_stop.sh - fn_commandname + fn_firstcommand_reset exitbypass=1 fn_update_ts3_dl exitbypass=1 command_start.sh - fn_commandname + fn_firstcommand_reset fi date +%s > "${lockdir}/lastupdate.lock" alert="update" From 167cf43e5bc207f551446a8a7681cec52a15e2f3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 17 Jul 2020 23:56:35 +0100 Subject: [PATCH 93/96] codacy --- .../config-lgsm/inssserver/_default.cfg | 4 ++-- .../config-lgsm/momserver/_default.cfg | 2 +- .../config-lgsm/mtaserver/_default.cfg | 1 + .../config-default/config-lgsm/utserver/_default.cfg | 1 + lgsm/functions/check_deps.sh | 6 ++++-- lgsm/functions/check_steamcmd.sh | 2 +- lgsm/functions/command_console.sh | 1 - lgsm/functions/command_update_linuxgsm.sh | 4 ++-- lgsm/functions/command_wipe.sh | 12 ++++++------ lgsm/functions/fix.sh | 2 +- lgsm/functions/fix_ark.sh | 10 +++++----- lgsm/functions/info_config.sh | 4 ++-- lgsm/functions/info_distro.sh | 4 ++-- lgsm/functions/install_logs.sh | 8 ++++---- linuxgsm.sh | 4 ++-- 15 files changed, 34 insertions(+), 31 deletions(-) diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 41c7a4810..1201e7036 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -22,9 +22,9 @@ maxplayers="28" fn_parms(){ # Allows serverpassword to work with parameters if [ "${serverpassword}" != "NOT SET" ]; then - parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport}?password="${serverpassword}" -hostname='${servername}' -log" + parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport}?password="${serverpassword}" -hostname="${servername}" -log" else - parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport} -hostname='${servername}' -log" + parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport} -hostname="${servername}" -log" fi } diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index 1ebe2f227..02565f473 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -16,7 +16,7 @@ maxplayers="32" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="-port=${port} -beaconport=${beaconport} -MULTIHOME="${ip}" -maxplayers=${maxplayers}" +parms="-port="${port}" -beaconport="${beaconport}" -MULTIHOME="${ip}" -maxplayers=${maxplayers}" } #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index 111a1b350..28887e4d3 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -139,6 +139,7 @@ executabledir="${systemdir}" executable="./mta-server64" servercfgdir="${systemdir}/mods/deathmatch" servercfg="mtaserver.conf" +servercfgdefault="mtaserver.conf" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index c60cb1a50..244e86ad6 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -142,6 +142,7 @@ executabledir="${systemdir}/Engine/Binaries/Linux" executable="./UE4Server-Linux-Shipping" servercfgdir="${systemdir}/UnrealTournament/Saved/Config/LinuxServer" servercfg="Game.ini" +servercfgdefault"Game.ini" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 17a2c4ada..0d4555e53 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -383,7 +383,7 @@ fn_deps_build_debian(){ # Battlefield: Vietnam elif [ "${shortname}" == "bfv" ]; then array_deps_required+=( libncurses5:i386 libstdc++5:i386 ) - # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source + # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then if [ "${arch}" == "x86_64" ]; then array_deps_required+=( libtinfo5:i386 ) @@ -447,6 +447,7 @@ fn_deps_build_debian(){ # Wurm: Unlimited elif [ "${shortname}" == "wurm" ]; then array_deps_required+=( xvfb ) + # Post Scriptum elif [ "${shortname}" == "pstbs" ]; then array_deps_required+=( libgconf-2-4 ) fi @@ -495,7 +496,7 @@ fn_deps_build_redhat(){ # Battlefield: Vietnam elif [ "${shortname}" == "bfv" ]; then array_deps_required+=( compat-libstdc++-33.i686 glibc.i686 ) - # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source + # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then array_deps_required+=( ncurses-libs.i686 ) # Brainbread 2, Don't Starve Together & Team Fortress 2 @@ -555,6 +556,7 @@ fn_deps_build_redhat(){ # Wurm: Unlimited elif [ "${shortname}" == "wurm" ]; then array_deps_required+=( xorg-x11-server-Xvfb ) + # Post Scriptum elif [ "${shortname}" == "pstbs" ]; then array_deps_required+=( GConf2 ) fi diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 456870054..647ee7525 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_steamcmd(){ - if [ ${shortname} == "ark" ]&&[ "${installsteamcmd}" == "1" ]; then + if [ "${shortname}" == "ark" ]&&[ "${installsteamcmd}" == "1" ]; then steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" fi if [ ! -d "${steamcmddir}" ]; then diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index d998e594d..338ea19c2 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -4,7 +4,6 @@ # Website: https://linuxgsm.com # Description: Gives access to the server tmux console. - commandname="CONSOLE" commandaction="Access console" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 072fc8817..56391409c 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -78,7 +78,7 @@ if [ "${script_diff}" != "" ]; then mkdir -p "${backupdir}/script" fi cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" - if [ $? -ne 0 ]; then + if [ $? != 0 ]; then fn_print_fail_eol_nl fn_script_log_fatal "Backup ${selfname}" core_exit.sh @@ -160,7 +160,7 @@ if [ -n "${functionsdir}" ]; then else curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1>/dev/null fi - if [ $? -ne 0 ]; then + if [ $? != 0 ]; then fn_print_error_eol_nl fn_script_log_error "Checking ${remotereponame} module ${functionfile}" echo -en "removing module ${functionfile}...\c" diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 5c17d6d5f..342a38658 100644 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -135,13 +135,13 @@ fn_wipe_server_files(){ fn_script_log_pass "No blueprint file to remove" fi elif [ "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then - echo -e "keeping blueprints" - fn_sleep_time - fn_script_log_info "Keeping blueprints" + echo -e "keeping blueprints" + fn_sleep_time + fn_script_log_info "Keeping blueprints" else - echo -e "no blueprints found" - fn_sleep_time - fn_script_log_pass "No blueprints found" + echo -e "no blueprints found" + fn_sleep_time + fn_script_log_pass "No blueprints found" fi # Wipe some logs that might be there. if [ "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]; then diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index a42f0e51d..74d6fb00b 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -21,7 +21,7 @@ fn_fix_msg_start_nl(){ } fn_fix_msg_end(){ - if [ $? -ne 0 ]; then + if [ $? != 0 ]; then fn_print_error_nl "Applying ${fixname} fix: ${gamename}" fn_script_log_error "Applying ${fixname} fix: ${gamename}" else diff --git a/lgsm/functions/fix_ark.sh b/lgsm/functions/fix_ark.sh index 3c1355b1e..4c4cf3f32 100644 --- a/lgsm/functions/fix_ark.sh +++ b/lgsm/functions/fix_ark.sh @@ -7,18 +7,18 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # removes mulitple appworkshop_346110.acf if found. -steamappsfilewc=$(find ${HOME} -name appworkshop_346110.acf | wc -l) +steamappsfilewc="$(find "${HOME}" -name appworkshop_346110.acf | wc -l)" if [ "${steamappsfilewc}" -gt "1" ]; then fixname="multiple appworkshop acf files" fn_fix_msg_start - find ${HOME} -name appworkshop_346110.acf -exec rm -f {} \; + find "${HOME}" -name appworkshop_346110.acf -exec rm -f {} \; fn_fix_msg_end elif [ "${steamappsfilewc}" -eq "1" ]; then # Steam mods directory selecter # This allows LinxuGSM to select either ~/.steam or ~/Steam. depending on what is being used - steamappsfile=$(find ${HOME} -name appworkshop_346110.acf) + steamappsfile=$(find "${HOME}" -name appworkshop_346110.acf) steamappsdir=$(dirname "${steamappsfile}") - steamappspath=$(cd "${steamappsdir}"|| return; cd ../;pwd) + steamappspath=$(cd "${steamappsdir}" || return; cd ../;pwd) # removes the symlink if exists. # fixes issue with older versions of LinuxGSM linking to /home/arkserver/steamcmd @@ -40,7 +40,7 @@ elif [ "${steamappsfilewc}" -eq "1" ]; then fi # if the steamapps symlink is incorrect unlink it. - if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]&&[ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]&&[ "$(readlink ${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps)" != "${steamappspath}" ]; then + if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]&&[ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]&&[ "$(readlink "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps")" != "${steamappspath}" ]; then fixname="incorrect steamapps symlink" fn_fix_msg_start unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index a59f96d79..14319b9bf 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -232,8 +232,8 @@ fn_info_config_chivalry(){ serverpassword="${unavailable}" adminpassword="${unavailable}" else - servername=$(egrep "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//') - adminpassword=$(egrep "^AdminPassword" "${servercfgfullpath}" | sed 's/^AdminPassword=//') + servername=$(grep -E "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//') + adminpassword=$(grep -E "^AdminPassword" "${servercfgfullpath}" | sed 's/^AdminPassword=//') # Not Set servername=${servername:-"NOT SET"} diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 87c73aa3e..c50953cdc 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -263,9 +263,9 @@ fi if [ "$(command -v jq 2>/dev/null)" ]; then if [ "${ip}" ]&&[ "${port}" ]; then if [ "${steammaster}" == "true" ]; then - masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${ip}':'${port}'&format=json' | jq '.response.servers[]?|.addr' | wc -l 2>/dev/null) + masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${ip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null) if [ "${masterserver}" == "0" ]; then - masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]?|.addr' | wc -l 2>/dev/null) + masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null) fi if [ "${masterserver}" == "0" ]; then displaymasterserver="false" diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 21c63ccbb..6a272f2ef 100644 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -15,7 +15,7 @@ fn_sleep_time # Create LinuxGSM logs. echo -en "installing log dir: ${logdir}..." mkdir -p "${logdir}" -if [ $? -ne 0 ]; then +if [ $? != 0 ]; then fn_print_fail_eol_nl core_exit.sh else @@ -24,7 +24,7 @@ fi echo -en "installing LinuxGSM log dir: ${lgsmlogdir}..." mkdir -p "${lgsmlogdir}" -if [ $? -ne 0 ]; then +if [ $? != 0 ]; then fn_print_fail_eol_nl core_exit.sh else @@ -32,7 +32,7 @@ else fi echo -en "creating LinuxGSM log: ${lgsmlog}..." touch "${lgsmlog}" -if [ $? -ne 0 ]; then +if [ $? != 0 ]; then fn_print_fail_eol_nl core_exit.sh else @@ -42,7 +42,7 @@ fi if [ "${consolelogdir}" ]; then echo -en "installing console log dir: ${consolelogdir}..." mkdir -p "${consolelogdir}" - if [ $? -ne 0 ]; then + if [ $? != 0 ]; then fn_print_fail_eol_nl core_exit.sh else diff --git a/linuxgsm.sh b/linuxgsm.sh index b832a8e1b..7f588937b 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -381,7 +381,7 @@ else mkdir -p "${configdirserver}" echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - if [ $? -ne 0 ]; then + if [ $? != 0 ]; then echo -e "FAIL" exit 1 else @@ -393,7 +393,7 @@ else fn_print_warn_nl "_default.cfg has altered. reloading config." echo -en "copying _default.cfg...\c" cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg" - if [ $? -ne 0 ]; then + if [ $? != 0 ]; then echo -e "FAIL" exit 1 else From 8121080aee9da1b79a82b41081ae06fbd9ac4d09 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 18 Jul 2020 00:11:46 +0100 Subject: [PATCH 94/96] Release v20.4.0 --- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index adb465b1a..4bdbd5c48 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.3" +version="v20.4.0" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index eaf7047e9..dced37f74 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.3" +version="v20.4.0" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 74b86b0d6..4837c4594 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.3" +version="v20.4.0" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index d785fa0b5..b4d0a4563 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.3.3" +version="v20.4.0" shortname="ts3" gameservername="ts3server" commandname="CORE" From 8673d9b7941ccb70e14f33cce9bee830dec77030 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 21 Jul 2020 12:09:30 +0100 Subject: [PATCH 95/96] fix(rustserver): fix blueprint not being wiped (#2972) Fix blueprint not being wiped on full-wipe Removed reference to random seeds as this feature doesn't exist yet updated command name from wipeall to full-wipe (old commands will still work but are now hidden) --- .../config-lgsm/rustserver/_default.cfg | 32 ++++------------ lgsm/functions/check_config.sh | 7 +--- lgsm/functions/command_wipe.sh | 28 +++++++------- lgsm/functions/core_dl.sh | 38 +++++++++---------- lgsm/functions/core_getopt.sh | 6 +-- 5 files changed, 46 insertions(+), 65 deletions(-) diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index 595cf3864..280b03033 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -9,41 +9,23 @@ #### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters -# More settings available after install in serverfiles/server/rust-server/server.cfg ip="0.0.0.0" port="28015" rconport="28016" appport=28082 rconpassword="CHANGE_ME" -rconweb="1" # Value is: 1 for Facepunch's web panel; 0 for RCON tools like Rusty or Rustadmin +rconweb="1" # Value is: 1 for the Facepunch web panel; 0 for RCON tools like Rusty or Rustadmin. servername="Rust" maxplayers="50" - -# Advanced Start Settings -seed="" # default random; range : 1 to 2147483647 ; used to change or reproduce a procedural map -salt="" # default random; range : unknown range ; used to recover a known setting from an existing map -worldsize="3000" # default 3000; range : 1000 to 6000 ; map size in meters -saveinterval="300" # Auto-save in seconds -tickrate="30" # default 30; range : 15 to 100 +seed="" # range: 1-2147483647, used to reproduce a procedural map. +salt="" # range: unknown, used to recover a known setting from an existing map. +worldsize="3000" # default: 3000, range: 1000-6000, map size in meters. +saveinterval="300" # Auto-save in seconds. +tickrate="30" # default: 30, range: 15-100. ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -# Specific to Rust -if [ "${seed}" ]; then - # If set, then add to start parms - conditionalseed="+server.seed ${seed}" -else - # Keep randomness of the number if not set - conditionalseed="" -fi -if [ "${salt}" ]; then - # If set, then add to start parms - conditionalsalt="+server.salt ${salt}" -else - # Keep randomness of the number if not set - conditionalsalt="" -fi -parms="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" ${conditionalseed} ${conditionalsalt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile" +parms="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile" } #### LinuxGSM Settings #### diff --git a/lgsm/functions/check_config.sh b/lgsm/functions/check_config.sh index c799904f2..2b4443cb3 100644 --- a/lgsm/functions/check_config.sh +++ b/lgsm/functions/check_config.sh @@ -20,15 +20,12 @@ fi if [ "${shortname}" == "rust" ]; then if [ -z "${rconpassword}" ]; then fn_print_dots "" - fn_print_fail_nl "RCON password is not set!" - echo -e " * Not setting an RCON password causes issues with ${gamename}" + fn_print_fail_nl "RCON password is not set" fn_script_log_fatal "RCON password is not set" - fn_script_log_fatal "Not setting an RCON password causes issues with ${gamename}" core_exit.sh elif [ "${rconpassword}" == "CHANGE_ME" ]; then fn_print_dots "" - fn_print_warn_nl "Default RCON Password detected!" - echo -e " * Having ${rconpassword} as a password is not very safe." + fn_print_warn_nl "Default RCON Password detected" fn_script_log_warn "Default RCON Password detected" fi fi diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 342a38658..66b335446 100644 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -26,7 +26,7 @@ fn_wipe_server_files(){ fn_print_start_nl "Wiping server" fn_script_log_info "Wiping server" # Wipe procedural map. - if [ "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.map")" ]; then + if [ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.map")" ]; then echo -en "removing procedural map proceduralmap.*.map file(s)..." fn_sleep_time fn_script_log_info "Removing procedural map file(s): ${serveridentitydir}/proceduralmap.*.map" @@ -39,7 +39,7 @@ fn_wipe_server_files(){ fn_script_log_pass "No procedural map file to remove" fi # Wipe procedural map save. - if [ "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.sav")" ]; then + if [ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.sav")" ]; then echo -en "removing map saves proceduralmap.*.sav file(s)..." fn_sleep_time fn_script_log_info "Removing procedural map save(s): ${serveridentitydir}/proceduralmap.*.sav" @@ -52,7 +52,7 @@ fn_wipe_server_files(){ fn_script_log_pass "No procedural map save to remove" fi # Wipe Barren map. - if [ "$(find "${serveridentitydir}" -type f -name "barren*.map")" ]; then + if [ -n "$(find "${serveridentitydir}" -type f -name "barren*.map")" ]; then echo -en "removing barren map barren*.map file(s)..." fn_sleep_time fn_script_log_info "Removing map file(s): ${serveridentitydir}/barren*.map" @@ -65,7 +65,7 @@ fn_wipe_server_files(){ fn_script_log_pass "No barren map file to remove" fi # Wipe barren map save. - if [ "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]; then + if [ -n "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]; then echo -en "removing barren map saves barren*.sav file(s)..." fn_sleep_time fn_script_log_info "Removing barren map save(s): ${serveridentitydir}/barren*.sav" @@ -98,7 +98,7 @@ fn_wipe_server_files(){ # We do not print additional information if there is nothing to remove since this might be obsolete. fi # Wipe sv.files. - if [ "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then + if [ -n "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then echo -en "removing server misc srv.files*.db file(s)..." fn_sleep_time fn_script_log_info "Removing server misc files: ${serveridentitydir}/sv.files.*.db" @@ -108,7 +108,7 @@ fn_wipe_server_files(){ # No further information if not found because it should I could not get this file showing up. fi # Wipe player death files. - if [ "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]; then + if [ -n "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]; then echo -en "removing player deaths player.deaths.*.db file(s)..." fn_sleep_time fn_script_log_info "Removing player death files: ${serveridentitydir}/player.deaths.*.db" @@ -122,7 +122,7 @@ fn_wipe_server_files(){ fi # Wipe blueprints only if full-wipe command was used. if [ "${fullwipe}" == "1" ]; then - if [ "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then + if [ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then echo -en "removing blueprints player.blueprints.*.db file(s)..." fn_sleep_time fn_script_log_info "Removing blueprint file(s): ${serveridentitydir}/player.blueprints.*.db" @@ -134,7 +134,7 @@ fn_wipe_server_files(){ fn_sleep_time fn_script_log_pass "No blueprint file to remove" fi - elif [ "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then + elif [ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then echo -e "keeping blueprints" fn_sleep_time fn_script_log_info "Keeping blueprints" @@ -144,8 +144,8 @@ fn_wipe_server_files(){ fn_script_log_pass "No blueprints found" fi # Wipe some logs that might be there. - if [ "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]; then - echo -en "removing Log files..." + if [ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]; then + echo -en "removing log files..." fn_sleep_time fn_script_log_info "Removing log files: ${serveridentitydir}/Log.*.txt" find "${serveridentitydir:?}" -type f -name "Log.*.txt" -delete @@ -204,8 +204,10 @@ if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ else fn_wipe_server_files fi - fn_print_ok_nl "" - fn_script_log_pass "Wiping server" + fn_print_complete_nl "Wiping ${selfname}" + fn_script_log_pass "Wiping ${selfname}" +else + fn_print_ok_nl "Wipe not required" + fn_script_log_pass "Wipe not required" fi - core_exit.sh diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index a6521ac03..ae11c4156 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -21,7 +21,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_dl_steamcmd(){ fn_print_start_nl "${remotelocation}" - fn_script_log_info "${commandaction} server: ${remotelocation}" + fn_script_log_info "${commandaction} ${selfname}: ${remotelocation}" if [ -n "${branch}" ]; then echo -e "Branch: ${branch}" fn_script_log_info "Branch: ${branch}" @@ -91,43 +91,43 @@ fn_dl_steamcmd(){ if [ -n "$(grep "Error!" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "ERROR!" "${steamcmdlog}" | tail -1)" ]; then # Not enough space. if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} server: ${remotelocation}: Not enough space to download server files" - fn_script_log_fatal "${commandaction} server: ${remotelocation}: Not enough space to download server files" + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files" core_exit.sh # Need tp purchase game. elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} server: ${remotelocation}: Steam account does not have a license for the required game" - fn_script_log_fatal "${commandaction} server: ${remotelocation}: Steam account does not have a license for the required game" + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" core_exit.sh # Two-factor authentication failure elif [ -n "$(grep "Two-factor code mismatch" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} server: ${remotelocation}: Two-factor authentication failure" - fn_script_log_fatal "${commandaction} server: ${remotelocation}: Two-factor authentication failure" + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" core_exit.sh # Incorrect Branch password elif [ -n "$(grep "Password check for AppId" "${steamcmdlog}" | tail -1)" ]; then - fn_print_failure_nl "${commandaction} server: ${remotelocation}: betapassword is incorrect" - fn_script_log_fatal "${commandaction} server: ${remotelocation}: betapassword is incorrect" + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" core_exit.sh # Update did not finish. elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then - fn_print_error2_nl "${commandaction} server: ${remotelocation}: Update required but not completed - check network" - fn_script_log_error "${commandaction} server: ${remotelocation}: Update required but not completed - check network" + fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network" + fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network" else - fn_print_error2_nl "${commandaction} server: ${remotelocation}: Unknown error occured" - fn_script_log_error "${commandaction} server: ${remotelocation}: Unknown error occured" + fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" + fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured" fi elif [ "${exitcode}" != "0" ]; then - fn_print_error2_nl "${commandaction} server: ${remotelocation}: Exit code: ${exitcode}" - fn_script_log_error "${commandaction} server: ${remotelocation}: Exit code: ${exitcode}" + fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}" + fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}" else - fn_print_complete_nl "${commandaction} server: ${remotelocation}" - fn_script_log_pass "${commandaction} server: ${remotelocation}" + fn_print_complete_nl "${commandaction} ${selfname}: ${remotelocation}" + fn_script_log_pass "${commandaction} ${selfname}: ${remotelocation}" fi if [ "${counter}" -gt "10" ]; then - fn_print_failure_nl "${commandaction} server: ${remotelocation}: Did not complete the download, too many retrys" - fn_script_log_fatal "${commandaction} server: ${remotelocation}: Did not complete the download, too many retrys" + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" + fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" core_exit.sh fi done diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index fe31f488f..bca60d5d9 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -36,8 +36,8 @@ cmd_mods_update=( "mu;mods-update" "command_mods_update.sh" "Update installed mo # Server specific. cmd_change_password=( "pw;change-password" "command_ts3_server_pass.sh" "Change TS3 serveradmin password." ) cmd_install_default_resources=( "ir;install-default-resources" "command_install_resources_mta.sh" "Install the MTA default resources." ) -cmd_wipe=( "wi;wipe" "command_wipe.sh" "Wipe your main game server data." ) -cmd_wipeall=( "wa;wipeall" "wipeall=1; command_wipe.sh" "Wipe your game server data and blueprints." ) +cmd_wipe=( "w;wipe;wi" "command_wipe.sh" "Map assets are wiped and blueprints are kept." ) +cmd_full_wipe=( "fw;full-wipe;wa;wipeall" "fullwipe=1; command_wipe.sh" "Map assets and blueprints are wiped." ) cmd_map_compressor_u99=( "mc;map-compressor" "compress_ut99_maps.sh" "Compresses all ${gamename} server maps." ) cmd_map_compressor_u2=( "mc;map-compressor" "compress_unreal2_maps.sh" "Compresses all ${gamename} server maps." ) cmd_install_cdkey=( "cd;server-cd-key" "install_ut2k4_key.sh" "Add your server cd key." ) @@ -94,7 +94,7 @@ fi # Unreal exclusive. if [ "${shortname}" == "rust" ]; then - currentopt+=( "${cmd_wipe[@]}" "${cmd_wipeall[@]}" ) + currentopt+=( "${cmd_wipe[@]}" "${cmd_full_wipe[@]}" ) fi if [ "${engine}" == "unreal2" ]; then if [ "${shortname}" == "ut2k4" ]; then From bb01afafc8b3e8e2ae2275a65ad498e72c8ce165 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 21 Jul 2020 12:13:02 +0100 Subject: [PATCH 96/96] Release v20.4.1 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index c0be8d8cc..08b21f8c0 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -7,7 +7,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v20.4.0" +modulesversion="v20.4.1" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 7f588937b..dc197210d 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.4.0" +version="v20.4.1" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 4bdbd5c48..6510c82b5 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.4.0" +version="v20.4.1" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index dced37f74..e546b74e9 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.4.0" +version="v20.4.1" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 4837c4594..8c52e05e4 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.4.0" +version="v20.4.1" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index b4d0a4563..8a6d38e18 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.4.0" +version="v20.4.1" shortname="ts3" gameservername="ts3server" commandname="CORE"