From 5165cfee697ad822bcce9a5242dc865b299f195a Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sun, 21 Jun 2020 13:25:58 +0000 Subject: [PATCH 01/32] Added Valheim _default.cfg Added Valheim to serverlistmenu.csv Added Valheim specific stop command --- .../config-lgsm/vhserver/_default.cfg | 170 ++++++++++++++++++ lgsm/data/serverlistmenu.csv | 107 +++++++++++ lgsm/functions/command_stop.sh | 23 +++ linuxgsm.sh | 2 +- 4 files changed, 301 insertions(+), 1 deletion(-) create mode 100644 lgsm/config-default/config-lgsm/vhserver/_default.cfg create mode 100644 lgsm/data/serverlistmenu.csv diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg new file mode 100644 index 000000000..a7727ef59 --- /dev/null +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -0,0 +1,170 @@ +################################## +######## 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 +name="Valheim Server" +password="" +port="2456" +world="World" +# 1 is true, 0 is false, whether server is public +public="1" + +## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +fn_parms(){ +parms="-name ${name} -password ${password} -port ${port} -world ${world} -public ${public}" +} + +#### 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="off" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="5" + +## 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="896660" +# 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 +# 11: Valheim +stopmode="11" + +## 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="Valheim" +engine="unity3d" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./valheim_server.x86_64" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/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/serverlistmenu.csv b/lgsm/data/serverlistmenu.csv new file mode 100644 index 000000000..34ad093e8 --- /dev/null +++ b/lgsm/data/serverlistmenu.csv @@ -0,0 +1,107 @@ +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 +bf1942,bf1942server,Battlefield 1942 +bmdm,bmdmserver,Black Mesa: Deathmatch +bo,boserver,Ballistic Overkill +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 +coduo,coduoserver,Call of Duty: United Offensive +codwaw,codwawserver,Call of Duty: World at War +cs,csserver,Counter-Strike 1.6 +cscz,csczserver,Counter-Strike: Condition Zero +csgo,csgoserver,Counter-Strike: Global Offensive +css,cssserver,Counter-Strike: Source +dab,dabserver,Double Action: Boogaloo +dmc,dmcserver,Deathmatch Classic +dod,dodserver,Day of Defeat +dods,dodsserver,Day of Defeat: Source +doi,doiserver,Day of Infamy +dst,dstserver,Don't Starve Together +dys,dysserver,Dystopia +eco,ecoserver,Eco +em,emserver,Empires Mod +etl,etlserver,ET: Legacy +fctr,fctrserver,Factorio +fof,fofserver,Fistful of Frags +ges,gesserver,GoldenEye: Source +gmod,gmodserver,Garrys Mod +hl2dm,hl2dmserver,Half-Life 2: Deathmatch +hldm,hldmserver,Half-Life: Deathmatch +hldms,hldmsserver,Half-Life Deathmatch: Source +hw,hwserver,Hurtworld +ins,insserver,Insurgency +inss,inssserver,Insurgency: Sandstorm +ios,iosserver,IOSoccer +jc2,jc2server,Just Cause 2 +jc3,jc3server,Just Cause 3 +kf,kfserver,Killing Floor +kf2,kf2server,Killing Floor 2 +l4d,l4dserver,Left 4 Dead +l4d2,l4d2server,Left 4 Dead 2 +mc,mcserver,Minecraft +mcb,mcbserver,Minecraft Bedrock +mh,mhserver,MORDHAU +mohaa,mohaaserver,Medal of Honor: Allied Assault +mta,mtaserver,Multi Theft Auto +mumble,mumbleserver,Mumble +nd,ndserver,Nuclear Dawn +nmrih,nmrihserver,No More Room in Hell +ns,nsserver,Natural Selection +ns2,ns2server,Natural Selection 2 +ns2c,ns2cserver,NS2: Combat +onset,onsetserver,Onset +opfor,opforserver,Opposing Force +pc,pcserver,Project Cars +pstbs,pstbsserver,Post Scriptum: The Bloody Seventh +pvkii,pvkiiserver,Pirates Vikings & Knights II +pz,pzserver,Project Zomboid +q2,q2server,Quake 2 +q3,q3server,Quake 3: Arena +ql,qlserver,Quake Live +qw,qwserver,Quake World +ricochet,ricochetserver,Ricochet +ro,roserver,Red Orchestra: Ostfront 41-45 +rtcw,rtcwserver,Return to Castle Wolfenstein +rust,rustserver,Rust +rw,rwserver,Rising World +samp,sampserver,San Andreas Multiplayer +sb,sbserver,Starbound +sbots,sbotsserver,StickyBots +sdtd,sdtdserver,7 Days to Die +sfc,sfcserver,SourceForts Classic +sof2,sof2server,Soldier Of Fortune 2: Gold Edition +sol,solserver,Soldat +squad,squadserver,Squad +ss3,ss3server,Serious Sam 3: BFE +st,stserver,Stationeers +sven,svenserver,Sven Co-op +terraria,terrariaserver,Terraria +tf2,tf2server,Team Fortress 2 +tfc,tfcserver,Team Fortress Classic +ts,tsserver,The Specialists +ts3,ts3server,Teamspeak 3 +tu,tuserver,Tower Unite +tw,twserver,Teeworlds +unt,untserver,Unturned +ut,utserver,Unreal Tournament +ut2k4,ut2k4server,Unreal Tournament 2004 +ut3,ut3server,Unreal Tournament 3 +ut99,ut99server,Unreal Tournament 99 +vs,vsserver,Vampire Slayer +wet,wetserver,Wolfenstein: Enemy Territory +wf,wfserver,Warfork +wurm,wurmserver,Wurm Unlimited +zmr,zmrserver,Zombie Master: Reborn +zps,zpsserver,Zombie Panic! Source diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 6ea4f4d7a..9594880eb 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -207,6 +207,27 @@ fn_stop_graceful_avorion(){ fi } +# Attempts graceful shutdown of valheim using the developer's +# custom half-baked shutdown procedure. Up till now, the game does +# not support any signals. +fn_stop_graceful_valheim(){ + fn_print_dots "Graceful: echo 1 to server_exit.drp" + fn_script_log_info "Graceful: echo 1 to server_exit.drp" + # sends quit + /bin/echo 1 > /home/steam/servers/valheim/server_exit.drp + + # Animate dots for shutdown period + for seconds in {1..10}; do + sleep 1 + fn_print_dots "Graceful: echo 1 to server_exit.drp: ${seconds}" + + done + fn_print_ok "Graceful: echo 1 to server_exit.drp: ${seconds}: " + fn_print_ok_eol_nl + fn_script_log_pass "Graceful: echo 1 to server_exit.drp: OK: ${seconds} seconds" +} + + fn_stop_graceful_select(){ if [ "${stopmode}" == "1" ]; then fn_stop_tmux @@ -228,6 +249,8 @@ fn_stop_graceful_select(){ fn_stop_graceful_goldsrc elif [ "${stopmode}" == "10" ]; then fn_stop_graceful_avorion + elif [ "${stopmode}" == "11" ]; then + fn_stop_graceful_valheim fi } diff --git a/linuxgsm.sh b/linuxgsm.sh index aececaed8..1a2e45258 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -46,7 +46,7 @@ userinput="${1}" ## GitHub Branch Select # Allows for the use of different function files # from a different repo and/or branch. -githubuser="GameServerManagers" +githubuser="AlasdairHaig" githubrepo="LinuxGSM" githubbranch="master" From dfa22661212259f036b071f3886cc48e408dc712 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sun, 21 Jun 2020 13:32:34 +0000 Subject: [PATCH 02/32] Added Valheim entry to Serverlist Table Added Valheim entry to Serverlistmenu Table --- lgsm/data/serverlist.csv | 3 ++- lgsm/data/serverlistmenu.csv | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index ac703ffe9..4e1ad1602 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -100,9 +100,10 @@ ut,utserver,Unreal Tournament ut2k4,ut2k4server,Unreal Tournament 2004 ut3,ut3server,Unreal Tournament 3 ut99,ut99server,Unreal Tournament 99 +vh,vhserver,Valheim vs,vsserver,Vampire Slayer wet,wetserver,Wolfenstein: Enemy Territory wf,wfserver,Warfork wurm,wurmserver,Wurm Unlimited zmr,zmrserver,Zombie Master: Reborn -zps,zpsserver,Zombie Panic! Source \ No newline at end of file +zps,zpsserver,Zombie Panic! Source diff --git a/lgsm/data/serverlistmenu.csv b/lgsm/data/serverlistmenu.csv index 34ad093e8..ac854cab6 100644 --- a/lgsm/data/serverlistmenu.csv +++ b/lgsm/data/serverlistmenu.csv @@ -100,6 +100,7 @@ ut2k4,ut2k4server,Unreal Tournament 2004 ut3,ut3server,Unreal Tournament 3 ut99,ut99server,Unreal Tournament 99 vs,vsserver,Vampire Slayer +vh,vhserver,Valheim wet,wetserver,Wolfenstein: Enemy Territory wf,wfserver,Warfork wurm,wurmserver,Wurm Unlimited From bfeab273b640a9b686a48ecce945c248ecef8097 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sun, 21 Jun 2020 14:57:16 +0000 Subject: [PATCH 03/32] Changes to server list --- lgsm/data/serverlistmenu.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/data/serverlistmenu.csv b/lgsm/data/serverlistmenu.csv index ac854cab6..77a57008f 100644 --- a/lgsm/data/serverlistmenu.csv +++ b/lgsm/data/serverlistmenu.csv @@ -99,8 +99,8 @@ ut,utserver,Unreal Tournament ut2k4,ut2k4server,Unreal Tournament 2004 ut3,ut3server,Unreal Tournament 3 ut99,ut99server,Unreal Tournament 99 -vs,vsserver,Vampire Slayer vh,vhserver,Valheim +vs,vsserver,Vampire Slayer wet,wetserver,Wolfenstein: Enemy Territory wf,wfserver,Warfork wurm,wurmserver,Wurm Unlimited From 8cf96e93573957b7f81257322aa78640d1f1f73f Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sat, 27 Jun 2020 19:02:49 +0200 Subject: [PATCH 04/32] Added Steam Username property that should be set by user --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index a7727ef59..0265795f8 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -114,6 +114,8 @@ appid="896660" branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" +# Valheim requires steam login, I suggest starting steamcmd beforehand and use email authentification for steamguard. This way only steam username is required during updates, etc. +steamuser="" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill From e974a113ca20b609cc87351625ed40a0523e2818 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sat, 27 Jun 2020 22:04:58 +0200 Subject: [PATCH 05/32] Removed steamuser from default config, should be placed in common.cfg --- .../config-lgsm/vhserver/_default.cfg | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 0265795f8..739c336e6 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -9,9 +9,14 @@ #### Game Server Settings #### ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters + +# Name of the server, as shown in steam server list name="Valheim Server" -password="" +# Minimum password length is 5 characters & Password cant be in the server name. +password="secret" +# Valheim's default port port="2456" +# The name of the world's save file world="World" # 1 is true, 0 is false, whether server is public public="1" @@ -114,8 +119,14 @@ appid="896660" branch="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" -# Valheim requires steam login, I suggest starting steamcmd beforehand and use email authentification for steamguard. This way only steam username is required during updates, etc. -steamuser="" + +## Important! Valheim is a game that requires ownership of the game, which will require +## the logging in with steamcmd. I suggest logging in ahead of time, and then add in the +## common.cfg file add: steamuser="" , along with using email verification with +## steamguard, you'll authorise the server for logging in. The first time logging in to steamcmd +## will require a verification code that you recieve per email. This is why it should be done +## before installing the server. Otherwise, it will try installing the server anonymously, +## which will not be possible. ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill From 7a7ef9a53817dd383068bece1010f11027509846 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sat, 27 Jun 2020 22:43:30 +0000 Subject: [PATCH 06/32] Added parentheses around World and Name parameters --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 739c336e6..2040194c1 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -23,7 +23,7 @@ public="1" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="-name ${name} -password ${password} -port ${port} -world ${world} -public ${public}" +parms="-name "${name}" -password ${password} -port ${port} -world "${world}" -public ${public}" } #### LinuxGSM Settings #### From e665cdec77ed8bde567d96620d74b981938774c1 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sat, 27 Jun 2020 22:52:18 +0000 Subject: [PATCH 07/32] Bash escapes for parentheses --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 2040194c1..00cd4783b 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -23,7 +23,7 @@ public="1" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="-name "${name}" -password ${password} -port ${port} -world "${world}" -public ${public}" +parms="-name \"${name}\" -password ${password} -port ${port} -world \"${world}\" -public ${public}" } #### LinuxGSM Settings #### From ca408ae8b5b92c2cf0777c217321c704e751f44d Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sat, 27 Jun 2020 22:53:42 +0000 Subject: [PATCH 08/32] Bash escapes for parentheses --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 00cd4783b..e66de8aea 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -23,7 +23,7 @@ public="1" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="-name \"${name}\" -password ${password} -port ${port} -world \"${world}\" -public ${public}" +parms="-name \"${name}\" -password \"${password}\" -port ${port} -world \"${world}\" -public ${public}" } #### LinuxGSM Settings #### From a4112b324a8e6870b8777007e26e8ad59ee20134 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sat, 27 Jun 2020 23:14:02 +0000 Subject: [PATCH 09/32] Server not staying alive, so added > /dev/null like in original --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index e66de8aea..e8b954c0b 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -23,7 +23,7 @@ public="1" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="-name \"${name}\" -password \"${password}\" -port ${port} -world \"${world}\" -public ${public}" +parms="-name \"${name}\" -password \"${password}\" -port ${port} -world \"${world}\" -public ${public} > /dev/null" } #### LinuxGSM Settings #### From 8efd4f7ab089609b826b0a87abdcbcfb542f60f4 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sat, 27 Jun 2020 23:50:22 +0000 Subject: [PATCH 10/32] LD_LIBRARY_PATH error --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index e8b954c0b..624e3a652 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -164,6 +164,7 @@ glibc="2.15" systemdir="${serverfiles}" executabledir="${serverfiles}" executable="./valheim_server.x86_64" +serverfiles="${rootdir}/serverfiles" ## Backup Directory backupdir="${lgsmdir}/backup" From 4918082e414c68805c64696d5a4a6e4171e39b37 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sun, 28 Jun 2020 02:25:06 +0200 Subject: [PATCH 11/32] Added fix for when doesn't stay running --- lgsm/functions/core_functions.sh | 5 +++++ lgsm/functions/fix.sh | 2 ++ lgsm/functions/fix_vh.sh | 9 +++++++++ 3 files changed, 16 insertions(+) mode change 100644 => 100755 lgsm/functions/core_functions.sh mode change 100644 => 100755 lgsm/functions/fix.sh create mode 100755 lgsm/functions/fix_vh.sh diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh old mode 100644 new mode 100755 index 4b0387194..ceb19879c --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -465,6 +465,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +fix_vh.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fix_wurm.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh old mode 100644 new mode 100755 index a42f0e51d..f644b015f --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -82,6 +82,8 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then fix_mta.sh elif [ "${shortname}" == "unt" ]; then fix_unt.sh + elif [ "${shortname}" == "vh" ]; then + fix_vh.sh elif [ "${shortname}" == "wurm" ]; then fix_wurm.sh elif [ "${shortname}" == "zmr" ]; then diff --git a/lgsm/functions/fix_vh.sh b/lgsm/functions/fix_vh.sh new file mode 100755 index 000000000..551bd878f --- /dev/null +++ b/lgsm/functions/fix_vh.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# LinuxGSM fix_rust.sh function +# Author: Alasdair Haig +# Website: https://linuxgsm.com +# Description: Resolves startup issue with Valheim + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH From 78de3f2f1be665364578b251effd8cbe3f2fa355 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sun, 28 Jun 2020 00:32:37 +0000 Subject: [PATCH 12/32] Removed escapes for parentheses --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 624e3a652..d633ee053 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -23,7 +23,7 @@ public="1" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="-name \"${name}\" -password \"${password}\" -port ${port} -world \"${world}\" -public ${public} > /dev/null" +parms="-name '${name}' -password '${password}' -port ${port} -world '${world}' -public ${public} > /dev/null" } #### LinuxGSM Settings #### From 1170ecbcba02bad83063048ae61aaaa05b910166 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sun, 28 Jun 2020 01:04:40 +0000 Subject: [PATCH 13/32] Fiddled with execution parameters --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index d633ee053..776b56bdf 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -23,7 +23,7 @@ public="1" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="-name '${name}' -password '${password}' -port ${port} -world '${world}' -public ${public} > /dev/null" +parms="-name ${name} -password ${password} -port ${port} -world ${world} -public ${public} > /dev/null" } #### LinuxGSM Settings #### From 8d1daa270576f6d5e7b0ee42c8a25497cbc1578c Mon Sep 17 00:00:00 2001 From: AlasdairHaig Date: Sun, 28 Jun 2020 12:40:29 +0200 Subject: [PATCH 14/32] Create Valheim.md --- lgsm/config-default/config-lgsm/vhserver/Valheim.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 lgsm/config-default/config-lgsm/vhserver/Valheim.md diff --git a/lgsm/config-default/config-lgsm/vhserver/Valheim.md b/lgsm/config-default/config-lgsm/vhserver/Valheim.md new file mode 100644 index 000000000..e652aafb6 --- /dev/null +++ b/lgsm/config-default/config-lgsm/vhserver/Valheim.md @@ -0,0 +1 @@ +A Saga of how a Viking wrote bashed some scripts runes together that led him on a journey to the missing tenth (or so) missing realm of Valheim! From 2cdb223e26f94833349a01cd7799a646188cef0f Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sun, 28 Jun 2020 16:19:40 +0000 Subject: [PATCH 15/32] Removing gamedig since there is no present support for Valheim --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 776b56bdf..13bf33a01 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -148,8 +148,8 @@ stopmode="11" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" -querytype="protocol-valve" +querymode="1" +#querytype="protocol-valve" ## Game Server Details # Do not edit From a0937682cb53754a86cdac11a8c3d0a03fedc831 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Tue, 30 Jun 2020 21:01:00 +0200 Subject: [PATCH 16/32] Base for rocketchat alerts --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 13bf33a01..169f9a534 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -75,6 +75,10 @@ channeltag="" pushoveralert="off" pushovertoken="accesstoken" +# Rocketchat Alerts +rocketchatalert="off" +rocketchatwebhook="webhook" + # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" slackwebhook="webhook" From 353569381c6ca92a1105290e605139b01d46282a Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Thu, 2 Jul 2020 00:12:11 +0200 Subject: [PATCH 17/32] Added rocketchat alert --- lgsm/functions/alert_rocketchat.sh | 111 +++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100755 lgsm/functions/alert_rocketchat.sh diff --git a/lgsm/functions/alert_rocketchat.sh b/lgsm/functions/alert_rocketchat.sh new file mode 100755 index 000000000..d8a0f2c23 --- /dev/null +++ b/lgsm/functions/alert_rocketchat.sh @@ -0,0 +1,111 @@ +#!/bin/bash +# LinuxGSM alert_rocketchat.sh function +# Author: Alasdair Haig +# Website: https://linuxgsm.com +# Description: Sends Rocketchat alert. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if ! command -v jq > /dev/null; then + fn_print_fail_nl "Sending Rocketchat alert: jq is missing." + fn_script_log_fatal "Sending Rocketchat alert: jq is missing." +fi + +#json=$(cat < Date: Thu, 2 Jul 2020 00:23:05 +0200 Subject: [PATCH 18/32] Added rocketchat token variable and setup base alert class to handle calling rocketchat alert script --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 1 + lgsm/functions/alert.sh | 11 +++++++++++ 2 files changed, 12 insertions(+) mode change 100644 => 100755 lgsm/functions/alert.sh diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 169f9a534..1d09a514c 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -78,6 +78,7 @@ pushovertoken="accesstoken" # Rocketchat Alerts rocketchatalert="off" rocketchatwebhook="webhook" +rocketchattoken="" # Slack Alerts | https://docs.linuxgsm.com/alerts/slack slackalert="off" diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh old mode 100644 new mode 100755 index 5f8fe156e..4a6c28d7f --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -190,6 +190,17 @@ elif [ -z "${telegramchatid}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_script_error "Telegram chat id not set." fi +if [ "${rocketchatalert}" == "on" ]&&[ -n "${rocketchatalert}" ]; then + alert_rocketchat.sh +elif [ "${rocketchatalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then + fn_print_warn_nl "Rocketchat alerts not enabled" + fn_script_log_warn "Rocketchat alerts not enabled" +elif [ -z "${rocketchattoken}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then + fn_print_error_nl "Rocketchat token not set" + #echo -e "* https://docs.linuxgsm.com/alerts/slack" + fn_script_error "Rocketchat token not set" +fi + if [ "${slackalert}" == "on" ]&&[ -n "${slackalert}" ]; then alert_slack.sh elif [ "${slackalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then From c741ed65b121347bd85e2e609f15c6ef3a15dc19 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Thu, 2 Jul 2020 00:31:06 +0200 Subject: [PATCH 19/32] Added rocketchat status to details command --- lgsm/functions/info_messages.sh | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 lgsm/functions/info_messages.sh diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh old mode 100644 new mode 100755 index 063914497..224bd9cbe --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -394,6 +394,7 @@ fn_info_message_script(){ # LinuxGSM version: v19.9.0 # glibc required: 2.15 # Discord alert: off + # Rocketchat alert: off # Slack alert: off # Email alert: off # Pushbullet alert: off @@ -434,6 +435,8 @@ fn_info_message_script(){ # Discord alert echo -e "${lightblue}Discord alert:\t${default}${discordalert}" + # Rocketchat alert + echo -e "${lightblue}Rocketchat alert:\t${default}${rocketchatalert}" # Slack alert echo -e "${lightblue}Slack alert:\t${default}${slackalert}" # Email alert From 52882c182c507cddd4d846551e546da0abb681f0 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Wed, 1 Jul 2020 22:38:48 +0000 Subject: [PATCH 20/32] Added missing entry in functions list --- lgsm/functions/core_functions.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index ceb19879c..dea5b5d2b 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -554,6 +554,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +alert_rocketchat.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + alert_slack.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function From 47b37f596c56ae80613260f02fc9418d7cff5d67 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Thu, 2 Jul 2020 18:06:39 +0000 Subject: [PATCH 21/32] Rocketchat alert working --- lgsm/functions/alert_rocketchat.sh | 61 ++---------------------------- 1 file changed, 3 insertions(+), 58 deletions(-) diff --git a/lgsm/functions/alert_rocketchat.sh b/lgsm/functions/alert_rocketchat.sh index d8a0f2c23..dddd473e8 100755 --- a/lgsm/functions/alert_rocketchat.sh +++ b/lgsm/functions/alert_rocketchat.sh @@ -11,68 +11,14 @@ if ! command -v jq > /dev/null; then fn_script_log_fatal "Sending Rocketchat alert: jq is missing." fi -#json=$(cat < Date: Fri, 3 Jul 2020 00:12:35 +0200 Subject: [PATCH 22/32] Added missing beta password for steamcmd --- lgsm/config-default/config-lgsm/vhserver/_default.cfg | 1 + lgsm/functions/update_steamcmd.sh | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg index 1d09a514c..78eab51cd 100644 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -122,6 +122,7 @@ sleeptime="0.5" appid="896660" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" +branchpassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server steammaster="false" diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 8a089c7f7..c5b19833f 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -30,7 +30,10 @@ fn_update_steamcmd_dl(){ # 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}" + if [ -n "${branchpassword}" ]; then + ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" -betapassword "${branchpassword}" +quit | tee -a "${lgsmlog}" + else + ${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 From 6b5007a11d7ab9330c39f3615d26385b43c40abd Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Thu, 2 Jul 2020 22:23:08 +0000 Subject: [PATCH 23/32] missing fi added --- lgsm/functions/update_steamcmd.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 lgsm/functions/update_steamcmd.sh diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh old mode 100644 new mode 100755 index 8a089c7f7..6beee4fad --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -30,7 +30,11 @@ fn_update_steamcmd_dl(){ # 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}" + if [ -n "${branchpassword}" ]; then + ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" -betapassword "${branchpassword}" +quit | tee -a "${lgsmlog}" + else + ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" +quit | tee -a "${lgsmlog}" + fi else ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" +quit | tee -a "${lgsmlog}" fi From 9f39365f7f77a3a92ebfdd5411de08cbe9dc54ed Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Thu, 2 Jul 2020 22:39:49 +0000 Subject: [PATCH 24/32] removed non-relative path from stop command --- lgsm/functions/command_stop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 9594880eb..6e74696f3 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -214,7 +214,7 @@ fn_stop_graceful_valheim(){ fn_print_dots "Graceful: echo 1 to server_exit.drp" fn_script_log_info "Graceful: echo 1 to server_exit.drp" # sends quit - /bin/echo 1 > /home/steam/servers/valheim/server_exit.drp + /bin/echo 1 > "${serverfiles}"/server_exit.drp # Animate dots for shutdown period for seconds in {1..10}; do From 5be1c44e7eb5a1790816af1d9dfabcdda0e32aec Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Fri, 3 Jul 2020 17:25:49 +0200 Subject: [PATCH 25/32] Added Readme --- .../config-lgsm/vhserver/Valheim.md | 53 ++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/Valheim.md b/lgsm/config-default/config-lgsm/vhserver/Valheim.md index e652aafb6..bd3c2ed1c 100644 --- a/lgsm/config-default/config-lgsm/vhserver/Valheim.md +++ b/lgsm/config-default/config-lgsm/vhserver/Valheim.md @@ -1 +1,52 @@ -A Saga of how a Viking wrote bashed some scripts runes together that led him on a journey to the missing tenth (or so) missing realm of Valheim! +A Saga of how a Viking wrote *bash*ed some scripts runes together that led him on a journey to the missing tenth (or so) missing realm of Valheim! +... *pausing for effect* ... + +Upon the whims of Odin, I was chosen to undergo the trial of Valheim, where, by chance, I met my liege, Sir Gloor, an outstanding burly Viking Warrior and Shaman (long beard, pointy hat), who had long discovered the secrets of Valheim, due to his divine connections. Blah blah blah ...etc. etc. etc., (skip the prologue)....booorrrriiinnngggg. Anyways, in order to be able to set out on adventures on dedicated servers, I'll point out some viking-ways to get you set up. First, you'll need 5 wood and 2 stones... + +I won't go into to much detail, as lot of the knowledge to run on a server is similar to the rest in Linuxgsm. So I will point to links to their site as I go along. +First the game has it's own parameters for starting that should be set. Like other games managed with Linuxgsm, these can be found in the corresponding game folder, in Valheim's case: lgsm/config-default/config-lgsm/vhserver/_default.cfg. You shouldn't edit this file, as a copy will be made elsewhere upon installing the server, at lgsm/conifg-lgsm/vhserver/_default.cfg. Note: this file is always checked by the code if it has been changed, and will always be reset to match the version of github. + +I will suggest setting the following in the common.cfg, which will apply to all game instances created: +- steamuser= + +(In the _default.cfg, I mention at the steam section, that you should login prior to install, as the default is to log on anonymously, which is, at the time of this writting, not allowed, as the server requires username and password. You should only need to set your username within the configuration file (common.cfg or '*instance*.cfg), and after logging on manually into steamcmd and entering your password once, it should remember the server as trustworthy. You may need to enter it manually again later, depending, otherwise you can add steampass="" in the file as well. It's just a matter of security, depending if you are willing to risk your steam account, should the server be compromised.) + +And then for specific game instances (i.e. vhserver, vhserver-2, etc.), you should +- name (server name as it appears in steam server list) +- world (the save name of the game world found under .config/unity3d/IronGate/Valheim/worlds/ ) +- password +- public (if you wish to change the default value: public) + +Technically, you can choose which settings are global for all servers (common.cfg) or localised for just a specific instance (*instance*.cfg). It is up to you to sharpen your axe and make the best choice for your situation. For example, I've chosen to make notification "global", turning them on in the common.cfg, so all games will be reported. + +Depending if you have a beta branch: +- branch +- branchpassword (this is presently lacking in the parent branch of Linuxgsm, but works for Valheim! Viking Power!) + +There are suggestions and steps to backing up the the entire server setup of Linuxgsm: https://docs.linuxgsm.com/commands/backup +I have done that, but I have also included, similarly, the automating backups of the actual world file (.config/unity3d/IronGate/Valheim/worlds/). Here is an example: +#!/bin/bash +cd /home//.config/unity3d/IronGate/Valheim/worlds/ + +files=`ls ./*.fwl` +for i in $files +do +file=`basename -s .fwl $i` +tar -czf "$1_$file.tar.gz" $file.fwl $file.db +done; + +This script combines to the files need for the world into one tar file, and does so for every unique world file. It takes a name as a parameter and places it in front of the world's name. So I have a monthly back up called Monthly_.tar.gz, that automatically overwrites itself every month. And similarly, the daily backup overwrites itself everyday. You can customize it as needed. This is an excerpt from cronjob: +# Valheim World Backups +0 0 * * * /home//.sh Daily >/dev/null 2>&1 +0 1 1 * * /home//.sh Monthly >/dev/null 2>&1 + +#$@&%*! *swearing after smashing a finger with the hammer while chiseling the words out* + +Presently, gamedig does not support Valheim, so I've set the default to check the session value, which is adequet. + +At this time in writing, I've added alert notification for rocketchat, which on the main repository is presently lacking. + + +All is as Odin wishes, + +A Saga, by the IT Viking From 8265aeb26817db7c044d55d95c91824fb25aa418 Mon Sep 17 00:00:00 2001 From: AlasdairHaig Date: Fri, 3 Jul 2020 17:32:21 +0200 Subject: [PATCH 26/32] Rename Valheim.md to README.md --- .../config-default/config-lgsm/vhserver/{Valheim.md => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lgsm/config-default/config-lgsm/vhserver/{Valheim.md => README.md} (100%) diff --git a/lgsm/config-default/config-lgsm/vhserver/Valheim.md b/lgsm/config-default/config-lgsm/vhserver/README.md similarity index 100% rename from lgsm/config-default/config-lgsm/vhserver/Valheim.md rename to lgsm/config-default/config-lgsm/vhserver/README.md From 3edc0ae7fa5b9e54ba9cb0f53062e04eeec46e43 Mon Sep 17 00:00:00 2001 From: AlasdairHaig Date: Fri, 3 Jul 2020 17:39:00 +0200 Subject: [PATCH 27/32] Update README.md --- .../config-lgsm/vhserver/README.md | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/README.md b/lgsm/config-default/config-lgsm/vhserver/README.md index bd3c2ed1c..b5822c478 100644 --- a/lgsm/config-default/config-lgsm/vhserver/README.md +++ b/lgsm/config-default/config-lgsm/vhserver/README.md @@ -7,24 +7,25 @@ I won't go into to much detail, as lot of the knowledge to run on a server is si First the game has it's own parameters for starting that should be set. Like other games managed with Linuxgsm, these can be found in the corresponding game folder, in Valheim's case: lgsm/config-default/config-lgsm/vhserver/_default.cfg. You shouldn't edit this file, as a copy will be made elsewhere upon installing the server, at lgsm/conifg-lgsm/vhserver/_default.cfg. Note: this file is always checked by the code if it has been changed, and will always be reset to match the version of github. I will suggest setting the following in the common.cfg, which will apply to all game instances created: -- steamuser= +`- steamuser=` (In the _default.cfg, I mention at the steam section, that you should login prior to install, as the default is to log on anonymously, which is, at the time of this writting, not allowed, as the server requires username and password. You should only need to set your username within the configuration file (common.cfg or '*instance*.cfg), and after logging on manually into steamcmd and entering your password once, it should remember the server as trustworthy. You may need to enter it manually again later, depending, otherwise you can add steampass="" in the file as well. It's just a matter of security, depending if you are willing to risk your steam account, should the server be compromised.) And then for specific game instances (i.e. vhserver, vhserver-2, etc.), you should -- name (server name as it appears in steam server list) -- world (the save name of the game world found under .config/unity3d/IronGate/Valheim/worlds/ ) -- password -- public (if you wish to change the default value: public) +- `name` (server name as it appears in steam server list) +- `world` (the save name of the game world found under .config/unity3d/IronGate/Valheim/worlds/ ) +- `password` +- `public` (if you wish to change the default value: public) Technically, you can choose which settings are global for all servers (common.cfg) or localised for just a specific instance (*instance*.cfg). It is up to you to sharpen your axe and make the best choice for your situation. For example, I've chosen to make notification "global", turning them on in the common.cfg, so all games will be reported. Depending if you have a beta branch: -- branch -- branchpassword (this is presently lacking in the parent branch of Linuxgsm, but works for Valheim! Viking Power!) +- `branch` +- `branchpassword` (this is presently lacking in the parent branch of Linuxgsm, but works for Valheim! Viking Power!) There are suggestions and steps to backing up the the entire server setup of Linuxgsm: https://docs.linuxgsm.com/commands/backup I have done that, but I have also included, similarly, the automating backups of the actual world file (.config/unity3d/IronGate/Valheim/worlds/). Here is an example: +```bash #!/bin/bash cd /home//.config/unity3d/IronGate/Valheim/worlds/ @@ -34,12 +35,13 @@ do file=`basename -s .fwl $i` tar -czf "$1_$file.tar.gz" $file.fwl $file.db done; - +``` This script combines to the files need for the world into one tar file, and does so for every unique world file. It takes a name as a parameter and places it in front of the world's name. So I have a monthly back up called Monthly_.tar.gz, that automatically overwrites itself every month. And similarly, the daily backup overwrites itself everyday. You can customize it as needed. This is an excerpt from cronjob: -# Valheim World Backups +``` +#Valheim World Backups 0 0 * * * /home//.sh Daily >/dev/null 2>&1 0 1 1 * * /home//.sh Monthly >/dev/null 2>&1 - +``` #$@&%*! *swearing after smashing a finger with the hammer while chiseling the words out* Presently, gamedig does not support Valheim, so I've set the default to check the session value, which is adequet. From a1082b1f6221030a6b827413a0c13097c3d7ec26 Mon Sep 17 00:00:00 2001 From: AlasdairHaig Date: Fri, 3 Jul 2020 17:43:59 +0200 Subject: [PATCH 28/32] Update README.md --- lgsm/config-default/config-lgsm/vhserver/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/README.md b/lgsm/config-default/config-lgsm/vhserver/README.md index b5822c478..ea53e5e94 100644 --- a/lgsm/config-default/config-lgsm/vhserver/README.md +++ b/lgsm/config-default/config-lgsm/vhserver/README.md @@ -1,4 +1,5 @@ -A Saga of how a Viking wrote *bash*ed some scripts runes together that led him on a journey to the missing tenth (or so) missing realm of Valheim! +A Saga of how a Viking wrote *bash*ed some scripts runes together that led him on a journey to the tenth (or so) missing realm of Valheim! + ... *pausing for effect* ... Upon the whims of Odin, I was chosen to undergo the trial of Valheim, where, by chance, I met my liege, Sir Gloor, an outstanding burly Viking Warrior and Shaman (long beard, pointy hat), who had long discovered the secrets of Valheim, due to his divine connections. Blah blah blah ...etc. etc. etc., (skip the prologue)....booorrrriiinnngggg. Anyways, in order to be able to set out on adventures on dedicated servers, I'll point out some viking-ways to get you set up. First, you'll need 5 wood and 2 stones... From 264d8d7373eb965034e6f0390d79bab85d584fda Mon Sep 17 00:00:00 2001 From: AlasdairHaig Date: Fri, 3 Jul 2020 17:54:27 +0200 Subject: [PATCH 29/32] Update README.md --- lgsm/config-default/config-lgsm/vhserver/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/vhserver/README.md b/lgsm/config-default/config-lgsm/vhserver/README.md index ea53e5e94..56999581c 100644 --- a/lgsm/config-default/config-lgsm/vhserver/README.md +++ b/lgsm/config-default/config-lgsm/vhserver/README.md @@ -4,7 +4,7 @@ A Saga of how a Viking wrote *bash*ed some scripts. First the game has it's own parameters for starting that should be set. Like other games managed with Linuxgsm, these can be found in the corresponding game folder, in Valheim's case: lgsm/config-default/config-lgsm/vhserver/_default.cfg. You shouldn't edit this file, as a copy will be made elsewhere upon installing the server, at lgsm/conifg-lgsm/vhserver/_default.cfg. Note: this file is always checked by the code if it has been changed, and will always be reset to match the version of github. I will suggest setting the following in the common.cfg, which will apply to all game instances created: From 18bea2109b73230f314249c3eac99defaf231c25 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sun, 5 Jul 2020 13:44:03 +0000 Subject: [PATCH 30/32] executable folder rights --- lgsm/functions/README.md | 0 lgsm/functions/alert_discord.sh | 0 lgsm/functions/alert_email.sh | 0 lgsm/functions/alert_ifttt.sh | 0 lgsm/functions/alert_mailgun.sh | 0 lgsm/functions/alert_pushbullet.sh | 0 lgsm/functions/alert_pushover.sh | 0 lgsm/functions/alert_slack.sh | 0 lgsm/functions/alert_telegram.sh | 0 lgsm/functions/check.sh | 0 lgsm/functions/check_config.sh | 0 lgsm/functions/check_deps.sh | 0 lgsm/functions/check_executable.sh | 0 lgsm/functions/check_glibc.sh | 0 lgsm/functions/check_ip.sh | 0 lgsm/functions/check_last_update.sh | 0 lgsm/functions/check_logs.sh | 0 lgsm/functions/check_permissions.sh | 0 lgsm/functions/check_root.sh | 0 lgsm/functions/check_status.sh | 0 lgsm/functions/check_steamcmd.sh | 0 lgsm/functions/check_system_dir.sh | 0 lgsm/functions/check_system_requirements.sh | 0 lgsm/functions/check_tmuxception.sh | 0 lgsm/functions/check_version.sh | 0 lgsm/functions/command_backup.sh | 0 lgsm/functions/command_console.sh | 0 lgsm/functions/command_debug.sh | 0 lgsm/functions/command_details.sh | 0 lgsm/functions/command_dev_clear_functions.sh | 0 lgsm/functions/command_dev_debug.sh | 0 lgsm/functions/command_dev_detect_deps.sh | 0 lgsm/functions/command_dev_detect_glibc.sh | 0 lgsm/functions/command_dev_detect_ldd.sh | 0 lgsm/functions/command_dev_query_raw.sh | 0 lgsm/functions/command_donate.sh | 0 lgsm/functions/command_fastdl.sh | 0 lgsm/functions/command_install.sh | 0 lgsm/functions/command_install_resources_mta.sh | 0 lgsm/functions/command_mods_install.sh | 0 lgsm/functions/command_mods_remove.sh | 0 lgsm/functions/command_mods_update.sh | 0 lgsm/functions/command_monitor.sh | 0 lgsm/functions/command_postdetails.sh | 0 lgsm/functions/command_restart.sh | 0 lgsm/functions/command_start.sh | 0 lgsm/functions/command_stop.sh | 0 lgsm/functions/command_test_alert.sh | 0 lgsm/functions/command_ts3_server_pass.sh | 0 lgsm/functions/command_update.sh | 0 lgsm/functions/command_update_functions.sh | 0 lgsm/functions/command_update_linuxgsm.sh | 0 lgsm/functions/command_validate.sh | 0 lgsm/functions/command_wipe.sh | 0 lgsm/functions/compress_unreal2_maps.sh | 0 lgsm/functions/compress_ut99_maps.sh | 0 lgsm/functions/core_dl.sh | 0 lgsm/functions/core_exit.sh | 0 lgsm/functions/core_getopt.sh | 0 lgsm/functions/core_legacy.sh | 0 lgsm/functions/core_logs.sh | 0 lgsm/functions/core_messages.sh | 0 lgsm/functions/core_trap.sh | 0 lgsm/functions/fix_ark.sh | 0 lgsm/functions/fix_arma3.sh | 0 lgsm/functions/fix_av.sh | 0 lgsm/functions/fix_cmw.sh | 0 lgsm/functions/fix_csgo.sh | 0 lgsm/functions/fix_dst.sh | 0 lgsm/functions/fix_ges.sh | 0 lgsm/functions/fix_hw.sh | 0 lgsm/functions/fix_ins.sh | 0 lgsm/functions/fix_kf.sh | 0 lgsm/functions/fix_kf2.sh | 0 lgsm/functions/fix_mcb.sh | 0 lgsm/functions/fix_mta.sh | 0 lgsm/functions/fix_nmrih.sh | 0 lgsm/functions/fix_onset.sh | 0 lgsm/functions/fix_ro.sh | 0 lgsm/functions/fix_rust.sh | 0 lgsm/functions/fix_rw.sh | 0 lgsm/functions/fix_sdtd.sh | 0 lgsm/functions/fix_sfc.sh | 0 lgsm/functions/fix_sof2.sh | 0 lgsm/functions/fix_ss3.sh | 0 lgsm/functions/fix_steamcmd.sh | 0 lgsm/functions/fix_terraria.sh | 0 lgsm/functions/fix_tf2.sh | 0 lgsm/functions/fix_ts3.sh | 0 lgsm/functions/fix_tu.sh | 0 lgsm/functions/fix_unt.sh | 0 lgsm/functions/fix_ut.sh | 0 lgsm/functions/fix_ut2k4.sh | 0 lgsm/functions/fix_ut3.sh | 0 lgsm/functions/fix_wurm.sh | 0 lgsm/functions/fix_zmr.sh | 0 lgsm/functions/info_config.sh | 0 lgsm/functions/info_distro.sh | 0 lgsm/functions/info_parms.sh | 0 lgsm/functions/info_stats.sh | 0 lgsm/functions/install_complete.sh | 0 lgsm/functions/install_config.sh | 0 lgsm/functions/install_dst_token.sh | 0 lgsm/functions/install_eula.sh | 0 lgsm/functions/install_factorio_save.sh | 0 lgsm/functions/install_gslt.sh | 0 lgsm/functions/install_header.sh | 0 lgsm/functions/install_logs.sh | 0 lgsm/functions/install_modules.sh | 0 lgsm/functions/install_mta_resources.sh | 0 lgsm/functions/install_retry.sh | 0 lgsm/functions/install_server_dir.sh | 0 lgsm/functions/install_server_files.sh | 0 lgsm/functions/install_squad_license.sh | 0 lgsm/functions/install_stats.sh | 0 lgsm/functions/install_steamcmd.sh | 0 lgsm/functions/install_ts3db.sh | 0 lgsm/functions/install_ut2k4_key.sh | 0 lgsm/functions/mods_core.sh | 0 lgsm/functions/mods_list.sh | 0 lgsm/functions/query_gamedig.sh | 0 lgsm/functions/query_gsquery.py | 0 lgsm/functions/update_factorio.sh | 0 lgsm/functions/update_minecraft.sh | 0 lgsm/functions/update_minecraft_bedrock.sh | 0 lgsm/functions/update_mta.sh | 0 lgsm/functions/update_mumble.sh | 0 lgsm/functions/update_ts3.sh | 0 128 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 lgsm/functions/README.md mode change 100644 => 100755 lgsm/functions/alert_discord.sh mode change 100644 => 100755 lgsm/functions/alert_email.sh mode change 100644 => 100755 lgsm/functions/alert_ifttt.sh mode change 100644 => 100755 lgsm/functions/alert_mailgun.sh mode change 100644 => 100755 lgsm/functions/alert_pushbullet.sh mode change 100644 => 100755 lgsm/functions/alert_pushover.sh mode change 100644 => 100755 lgsm/functions/alert_slack.sh mode change 100644 => 100755 lgsm/functions/alert_telegram.sh mode change 100644 => 100755 lgsm/functions/check.sh mode change 100644 => 100755 lgsm/functions/check_config.sh mode change 100644 => 100755 lgsm/functions/check_deps.sh mode change 100644 => 100755 lgsm/functions/check_executable.sh mode change 100644 => 100755 lgsm/functions/check_glibc.sh mode change 100644 => 100755 lgsm/functions/check_ip.sh mode change 100644 => 100755 lgsm/functions/check_last_update.sh mode change 100644 => 100755 lgsm/functions/check_logs.sh mode change 100644 => 100755 lgsm/functions/check_permissions.sh mode change 100644 => 100755 lgsm/functions/check_root.sh mode change 100644 => 100755 lgsm/functions/check_status.sh mode change 100644 => 100755 lgsm/functions/check_steamcmd.sh mode change 100644 => 100755 lgsm/functions/check_system_dir.sh mode change 100644 => 100755 lgsm/functions/check_system_requirements.sh mode change 100644 => 100755 lgsm/functions/check_tmuxception.sh mode change 100644 => 100755 lgsm/functions/check_version.sh mode change 100644 => 100755 lgsm/functions/command_backup.sh mode change 100644 => 100755 lgsm/functions/command_console.sh mode change 100644 => 100755 lgsm/functions/command_debug.sh mode change 100644 => 100755 lgsm/functions/command_details.sh mode change 100644 => 100755 lgsm/functions/command_dev_clear_functions.sh mode change 100644 => 100755 lgsm/functions/command_dev_debug.sh mode change 100644 => 100755 lgsm/functions/command_dev_detect_deps.sh mode change 100644 => 100755 lgsm/functions/command_dev_detect_glibc.sh mode change 100644 => 100755 lgsm/functions/command_dev_detect_ldd.sh mode change 100644 => 100755 lgsm/functions/command_dev_query_raw.sh mode change 100644 => 100755 lgsm/functions/command_donate.sh mode change 100644 => 100755 lgsm/functions/command_fastdl.sh mode change 100644 => 100755 lgsm/functions/command_install.sh mode change 100644 => 100755 lgsm/functions/command_install_resources_mta.sh mode change 100644 => 100755 lgsm/functions/command_mods_install.sh mode change 100644 => 100755 lgsm/functions/command_mods_remove.sh mode change 100644 => 100755 lgsm/functions/command_mods_update.sh mode change 100644 => 100755 lgsm/functions/command_monitor.sh mode change 100644 => 100755 lgsm/functions/command_postdetails.sh mode change 100644 => 100755 lgsm/functions/command_restart.sh mode change 100644 => 100755 lgsm/functions/command_start.sh mode change 100644 => 100755 lgsm/functions/command_stop.sh mode change 100644 => 100755 lgsm/functions/command_test_alert.sh mode change 100644 => 100755 lgsm/functions/command_ts3_server_pass.sh mode change 100644 => 100755 lgsm/functions/command_update.sh mode change 100644 => 100755 lgsm/functions/command_update_functions.sh mode change 100644 => 100755 lgsm/functions/command_update_linuxgsm.sh mode change 100644 => 100755 lgsm/functions/command_validate.sh mode change 100644 => 100755 lgsm/functions/command_wipe.sh mode change 100644 => 100755 lgsm/functions/compress_unreal2_maps.sh mode change 100644 => 100755 lgsm/functions/compress_ut99_maps.sh mode change 100644 => 100755 lgsm/functions/core_dl.sh mode change 100644 => 100755 lgsm/functions/core_exit.sh mode change 100644 => 100755 lgsm/functions/core_getopt.sh mode change 100644 => 100755 lgsm/functions/core_legacy.sh mode change 100644 => 100755 lgsm/functions/core_logs.sh mode change 100644 => 100755 lgsm/functions/core_messages.sh mode change 100644 => 100755 lgsm/functions/core_trap.sh mode change 100644 => 100755 lgsm/functions/fix_ark.sh mode change 100644 => 100755 lgsm/functions/fix_arma3.sh mode change 100644 => 100755 lgsm/functions/fix_av.sh mode change 100644 => 100755 lgsm/functions/fix_cmw.sh mode change 100644 => 100755 lgsm/functions/fix_csgo.sh mode change 100644 => 100755 lgsm/functions/fix_dst.sh mode change 100644 => 100755 lgsm/functions/fix_ges.sh mode change 100644 => 100755 lgsm/functions/fix_hw.sh mode change 100644 => 100755 lgsm/functions/fix_ins.sh mode change 100644 => 100755 lgsm/functions/fix_kf.sh mode change 100644 => 100755 lgsm/functions/fix_kf2.sh mode change 100644 => 100755 lgsm/functions/fix_mcb.sh mode change 100644 => 100755 lgsm/functions/fix_mta.sh mode change 100644 => 100755 lgsm/functions/fix_nmrih.sh mode change 100644 => 100755 lgsm/functions/fix_onset.sh mode change 100644 => 100755 lgsm/functions/fix_ro.sh mode change 100644 => 100755 lgsm/functions/fix_rust.sh mode change 100644 => 100755 lgsm/functions/fix_rw.sh mode change 100644 => 100755 lgsm/functions/fix_sdtd.sh mode change 100644 => 100755 lgsm/functions/fix_sfc.sh mode change 100644 => 100755 lgsm/functions/fix_sof2.sh mode change 100644 => 100755 lgsm/functions/fix_ss3.sh mode change 100644 => 100755 lgsm/functions/fix_steamcmd.sh mode change 100644 => 100755 lgsm/functions/fix_terraria.sh mode change 100644 => 100755 lgsm/functions/fix_tf2.sh mode change 100644 => 100755 lgsm/functions/fix_ts3.sh mode change 100644 => 100755 lgsm/functions/fix_tu.sh mode change 100644 => 100755 lgsm/functions/fix_unt.sh mode change 100644 => 100755 lgsm/functions/fix_ut.sh mode change 100644 => 100755 lgsm/functions/fix_ut2k4.sh mode change 100644 => 100755 lgsm/functions/fix_ut3.sh mode change 100644 => 100755 lgsm/functions/fix_wurm.sh mode change 100644 => 100755 lgsm/functions/fix_zmr.sh mode change 100644 => 100755 lgsm/functions/info_config.sh mode change 100644 => 100755 lgsm/functions/info_distro.sh mode change 100644 => 100755 lgsm/functions/info_parms.sh mode change 100644 => 100755 lgsm/functions/info_stats.sh mode change 100644 => 100755 lgsm/functions/install_complete.sh mode change 100644 => 100755 lgsm/functions/install_config.sh mode change 100644 => 100755 lgsm/functions/install_dst_token.sh mode change 100644 => 100755 lgsm/functions/install_eula.sh mode change 100644 => 100755 lgsm/functions/install_factorio_save.sh mode change 100644 => 100755 lgsm/functions/install_gslt.sh mode change 100644 => 100755 lgsm/functions/install_header.sh mode change 100644 => 100755 lgsm/functions/install_logs.sh mode change 100644 => 100755 lgsm/functions/install_modules.sh mode change 100644 => 100755 lgsm/functions/install_mta_resources.sh mode change 100644 => 100755 lgsm/functions/install_retry.sh mode change 100644 => 100755 lgsm/functions/install_server_dir.sh mode change 100644 => 100755 lgsm/functions/install_server_files.sh mode change 100644 => 100755 lgsm/functions/install_squad_license.sh mode change 100644 => 100755 lgsm/functions/install_stats.sh mode change 100644 => 100755 lgsm/functions/install_steamcmd.sh mode change 100644 => 100755 lgsm/functions/install_ts3db.sh mode change 100644 => 100755 lgsm/functions/install_ut2k4_key.sh mode change 100644 => 100755 lgsm/functions/mods_core.sh mode change 100644 => 100755 lgsm/functions/mods_list.sh mode change 100644 => 100755 lgsm/functions/query_gamedig.sh mode change 100644 => 100755 lgsm/functions/query_gsquery.py mode change 100644 => 100755 lgsm/functions/update_factorio.sh mode change 100644 => 100755 lgsm/functions/update_minecraft.sh mode change 100644 => 100755 lgsm/functions/update_minecraft_bedrock.sh mode change 100644 => 100755 lgsm/functions/update_mta.sh mode change 100644 => 100755 lgsm/functions/update_mumble.sh mode change 100644 => 100755 lgsm/functions/update_ts3.sh diff --git a/lgsm/functions/README.md b/lgsm/functions/README.md old mode 100644 new mode 100755 diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/alert_ifttt.sh b/lgsm/functions/alert_ifttt.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/alert_mailgun.sh b/lgsm/functions/alert_mailgun.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/alert_pushbullet.sh b/lgsm/functions/alert_pushbullet.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/alert_pushover.sh b/lgsm/functions/alert_pushover.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/alert_slack.sh b/lgsm/functions/alert_slack.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/alert_telegram.sh b/lgsm/functions/alert_telegram.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_config.sh b/lgsm/functions/check_config.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_executable.sh b/lgsm/functions/check_executable.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_glibc.sh b/lgsm/functions/check_glibc.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_last_update.sh b/lgsm/functions/check_last_update.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_root.sh b/lgsm/functions/check_root.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_status.sh b/lgsm/functions/check_status.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/functions/check_system_dir.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/functions/check_tmuxception.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/check_version.sh b/lgsm/functions/check_version.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_dev_clear_functions.sh b/lgsm/functions/command_dev_clear_functions.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/functions/command_dev_detect_ldd.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_donate.sh b/lgsm/functions/command_donate.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/core_logs.sh b/lgsm/functions/core_logs.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/core_trap.sh b/lgsm/functions/core_trap.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_ark.sh b/lgsm/functions/fix_ark.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_arma3.sh b/lgsm/functions/fix_arma3.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_av.sh b/lgsm/functions/fix_av.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_cmw.sh b/lgsm/functions/fix_cmw.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_csgo.sh b/lgsm/functions/fix_csgo.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_dst.sh b/lgsm/functions/fix_dst.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_ges.sh b/lgsm/functions/fix_ges.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_hw.sh b/lgsm/functions/fix_hw.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_ins.sh b/lgsm/functions/fix_ins.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_kf2.sh b/lgsm/functions/fix_kf2.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_mcb.sh b/lgsm/functions/fix_mcb.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_mta.sh b/lgsm/functions/fix_mta.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_nmrih.sh b/lgsm/functions/fix_nmrih.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_onset.sh b/lgsm/functions/fix_onset.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_rw.sh b/lgsm/functions/fix_rw.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_sdtd.sh b/lgsm/functions/fix_sdtd.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_sfc.sh b/lgsm/functions/fix_sfc.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_sof2.sh b/lgsm/functions/fix_sof2.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_ss3.sh b/lgsm/functions/fix_ss3.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_terraria.sh b/lgsm/functions/fix_terraria.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_tf2.sh b/lgsm/functions/fix_tf2.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_ts3.sh b/lgsm/functions/fix_ts3.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_tu.sh b/lgsm/functions/fix_tu.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_unt.sh b/lgsm/functions/fix_unt.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_ut.sh b/lgsm/functions/fix_ut.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_ut3.sh b/lgsm/functions/fix_ut3.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_wurm.sh b/lgsm/functions/fix_wurm.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix_zmr.sh b/lgsm/functions/fix_zmr.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/info_stats.sh b/lgsm/functions/info_stats.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_complete.sh b/lgsm/functions/install_complete.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_dst_token.sh b/lgsm/functions/install_dst_token.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_eula.sh b/lgsm/functions/install_eula.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_factorio_save.sh b/lgsm/functions/install_factorio_save.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_gslt.sh b/lgsm/functions/install_gslt.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_header.sh b/lgsm/functions/install_header.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_modules.sh b/lgsm/functions/install_modules.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_retry.sh b/lgsm/functions/install_retry.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/functions/install_server_dir.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_squad_license.sh b/lgsm/functions/install_squad_license.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_stats.sh b/lgsm/functions/install_stats.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_steamcmd.sh b/lgsm/functions/install_steamcmd.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/install_ut2k4_key.sh b/lgsm/functions/install_ut2k4_key.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py old mode 100644 new mode 100755 diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh old mode 100644 new mode 100755 From 2e9f985f1318185e58607557d047673ac875ee02 Mon Sep 17 00:00:00 2001 From: Alasdair Haig Date: Sun, 5 Jul 2020 18:10:36 +0200 Subject: [PATCH 31/32] update_steamcmd accidently removed --- lgsm/functions/update_steamcmd.sh | 252 ++++++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 lgsm/functions/update_steamcmd.sh diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh new file mode 100644 index 000000000..6beee4fad --- /dev/null +++ b/lgsm/functions/update_steamcmd.sh @@ -0,0 +1,252 @@ +#!/bin/bash +# LinuxGSM update_steamcmd.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Handles updating using SteamCMD. + +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 + if [ -n "${branchpassword}" ]; then + ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" -betapassword "${branchpassword}" +quit | tee -a "${lgsmlog}" + else + ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" +quit | tee -a "${lgsmlog}" + fi + 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}" + fn_appmanifest_check + # 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" + fi + + # Checks if localbuild variable has been set. + if [ -z "${localbuild}" ]||[ "${localbuild}" == "null" ]; then + fn_print_fail "Checking local build: ${remotelocation}" + fn_script_log_fatal "Checking local build" + core_exit.sh + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_steamcmd_remotebuild(){ + # Gets remote build info. + 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}" + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_steamcmd_compare(){ + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuild}" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + if [ -v "${branch}" ]; then + echo -e "* Branch: ${branch}" + 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 + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuild}" + + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_steamcmd_dl + # If server started. + else + fn_stop_warning + exitbypass=1 + command_stop.sh + exitbypass=1 + fn_update_steamcmd_dl + exitbypass=1 + command_start.sh + fi + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + if [ -v "${branch}" ]; then + echo -e "* Branch: ${branch}" + 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 + fn_script_log_info "Branch: ${branch}" + fi + fi +} + +fn_appmanifest_info(){ + appmanifestfile=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf") + appmanifestfilewc=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l) +} + +fn_appmanifest_check(){ + fn_appmanifest_info + # Multiple or no matching appmanifest files may sometimes be present. + # This error is corrected if required. + if [ "${appmanifestfilewc}" -ge "2" ]; then + fn_print_error "Multiple appmanifest_${appid}.acf files found" + fn_script_log_error "Multiple appmanifest_${appid}.acf files found" + fn_print_dots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files" + for appfile in ${appmanifestfile}; do + rm -f "${appfile:?}" + done + appmanifestfilewc1="${appmanifestfilewc}" + fn_appmanifest_info + # if error can not be resolved. + if [ "${appmanifestfilewc}" -ge "2" ]; then + fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" + fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" + echo -e "* Check user permissions" + for appfile in ${appmanifestfile}; do + echo -e " ${appfile}" + done + core_exit.sh + else + fn_print_ok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" + 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 + 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_appmanifest_info + if [ "${appmanifestfilewc}" -eq "0" ]; then + fn_print_fail_nl "Still no appmanifest_${appid}.acf found" + fn_script_log_fatal "Still no appmanifest_${appid}.acf found" + core_exit.sh + fi + 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="SteamCMD" +check_steamcmd.sh + +if [ "${forceupdate}" == "1" ]; then + # forceupdate bypasses update checks. + check_status.sh + if [ "${status}" != "0" ]; then + fn_stop_warning + exitbypass=1 + command_stop.sh + fn_update_steamcmd_dl + date +%s > "${lockdir}/lastupdate.lock" + exitbypass=1 + command_start.sh + else + fn_update_steamcmd_dl + 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 +fi From ca5ac085bff531b7529f2e912580a69d87817255 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 12 Sep 2020 22:15:33 +0100 Subject: [PATCH 32/32] tabs --- lgsm/data/serverlistmenu.csv | 108 --------------------------------- lgsm/functions/command_stop.sh | 25 ++++---- 2 files changed, 12 insertions(+), 121 deletions(-) delete mode 100644 lgsm/data/serverlistmenu.csv diff --git a/lgsm/data/serverlistmenu.csv b/lgsm/data/serverlistmenu.csv deleted file mode 100644 index 77a57008f..000000000 --- a/lgsm/data/serverlistmenu.csv +++ /dev/null @@ -1,108 +0,0 @@ -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 -bf1942,bf1942server,Battlefield 1942 -bmdm,bmdmserver,Black Mesa: Deathmatch -bo,boserver,Ballistic Overkill -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 -coduo,coduoserver,Call of Duty: United Offensive -codwaw,codwawserver,Call of Duty: World at War -cs,csserver,Counter-Strike 1.6 -cscz,csczserver,Counter-Strike: Condition Zero -csgo,csgoserver,Counter-Strike: Global Offensive -css,cssserver,Counter-Strike: Source -dab,dabserver,Double Action: Boogaloo -dmc,dmcserver,Deathmatch Classic -dod,dodserver,Day of Defeat -dods,dodsserver,Day of Defeat: Source -doi,doiserver,Day of Infamy -dst,dstserver,Don't Starve Together -dys,dysserver,Dystopia -eco,ecoserver,Eco -em,emserver,Empires Mod -etl,etlserver,ET: Legacy -fctr,fctrserver,Factorio -fof,fofserver,Fistful of Frags -ges,gesserver,GoldenEye: Source -gmod,gmodserver,Garrys Mod -hl2dm,hl2dmserver,Half-Life 2: Deathmatch -hldm,hldmserver,Half-Life: Deathmatch -hldms,hldmsserver,Half-Life Deathmatch: Source -hw,hwserver,Hurtworld -ins,insserver,Insurgency -inss,inssserver,Insurgency: Sandstorm -ios,iosserver,IOSoccer -jc2,jc2server,Just Cause 2 -jc3,jc3server,Just Cause 3 -kf,kfserver,Killing Floor -kf2,kf2server,Killing Floor 2 -l4d,l4dserver,Left 4 Dead -l4d2,l4d2server,Left 4 Dead 2 -mc,mcserver,Minecraft -mcb,mcbserver,Minecraft Bedrock -mh,mhserver,MORDHAU -mohaa,mohaaserver,Medal of Honor: Allied Assault -mta,mtaserver,Multi Theft Auto -mumble,mumbleserver,Mumble -nd,ndserver,Nuclear Dawn -nmrih,nmrihserver,No More Room in Hell -ns,nsserver,Natural Selection -ns2,ns2server,Natural Selection 2 -ns2c,ns2cserver,NS2: Combat -onset,onsetserver,Onset -opfor,opforserver,Opposing Force -pc,pcserver,Project Cars -pstbs,pstbsserver,Post Scriptum: The Bloody Seventh -pvkii,pvkiiserver,Pirates Vikings & Knights II -pz,pzserver,Project Zomboid -q2,q2server,Quake 2 -q3,q3server,Quake 3: Arena -ql,qlserver,Quake Live -qw,qwserver,Quake World -ricochet,ricochetserver,Ricochet -ro,roserver,Red Orchestra: Ostfront 41-45 -rtcw,rtcwserver,Return to Castle Wolfenstein -rust,rustserver,Rust -rw,rwserver,Rising World -samp,sampserver,San Andreas Multiplayer -sb,sbserver,Starbound -sbots,sbotsserver,StickyBots -sdtd,sdtdserver,7 Days to Die -sfc,sfcserver,SourceForts Classic -sof2,sof2server,Soldier Of Fortune 2: Gold Edition -sol,solserver,Soldat -squad,squadserver,Squad -ss3,ss3server,Serious Sam 3: BFE -st,stserver,Stationeers -sven,svenserver,Sven Co-op -terraria,terrariaserver,Terraria -tf2,tf2server,Team Fortress 2 -tfc,tfcserver,Team Fortress Classic -ts,tsserver,The Specialists -ts3,ts3server,Teamspeak 3 -tu,tuserver,Tower Unite -tw,twserver,Teeworlds -unt,untserver,Unturned -ut,utserver,Unreal Tournament -ut2k4,ut2k4server,Unreal Tournament 2004 -ut3,ut3server,Unreal Tournament 3 -ut99,ut99server,Unreal Tournament 99 -vh,vhserver,Valheim -vs,vsserver,Vampire Slayer -wet,wetserver,Wolfenstein: Enemy Territory -wf,wfserver,Warfork -wurm,wurmserver,Wurm Unlimited -zmr,zmrserver,Zombie Master: Reborn -zps,zpsserver,Zombie Panic! Source diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 82f5c86da..81eac9430 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -212,20 +212,19 @@ fn_stop_graceful_avorion(){ # custom half-baked shutdown procedure. Up till now, the game does # not support any signals. fn_stop_graceful_valheim(){ - fn_print_dots "Graceful: echo 1 to server_exit.drp" - fn_script_log_info "Graceful: echo 1 to server_exit.drp" - # sends quit - /bin/echo 1 > "${serverfiles}"/server_exit.drp - - # Animate dots for shutdown period - for seconds in {1..10}; do - sleep 1 - fn_print_dots "Graceful: echo 1 to server_exit.drp: ${seconds}" + fn_print_dots "Graceful: echo 1 to server_exit.drp" + fn_script_log_info "Graceful: echo 1 to server_exit.drp" + # sends quit + echo 1 > "${serverfiles}"/server_exit.drp - done - fn_print_ok "Graceful: echo 1 to server_exit.drp: ${seconds}: " - fn_print_ok_eol_nl - fn_script_log_pass "Graceful: echo 1 to server_exit.drp: OK: ${seconds} seconds" + # Animate dots for shutdown period + for seconds in {1..10}; do + sleep 1 + fn_print_dots "Graceful: echo 1 to server_exit.drp: ${seconds}" + done + fn_print_ok "Graceful: echo 1 to server_exit.drp: ${seconds}: " + fn_print_ok_eol_nl + fn_script_log_pass "Graceful: echo 1 to server_exit.drp: OK: ${seconds} seconds" }