From a721c5d165db8452291e3f3a87567b957afeeb09 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 7 Jan 2018 21:31:27 +0000 Subject: [PATCH 01/18] test saving with calc --- lgsm/data/serverlist.csv | 148 +++++++++++++++++++-------------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 8b91fe6f2..a4e67716a 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,74 +1,74 @@ -arma3,arma3server,ARMA 3 -sdtd,sdtdserver,7 Days to Die -ark,arkserver,ARK: Survival Evolved -bo,boserver,Ballistic Overkill -bf1942,bf1942server,Battlefield 1942 -bmdm,bmdmserver,Black Mesa: Deathmatch -bs,bsserver,Blade Symphony -bb2,bb2server,BrainBread 2 -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 -cc,ccserver,Codename CURE -cs,csserver,Counter-Strike 1.6 -cscz,csczserver,Counter-Strike: Condition Zero -csgo,csgoserver,Counter-Strike: Global Offensive -css,cssserver,Counter-Strike: Source -dod,dodserver,Day of Defeat -dods,dodsserver,Day of Defeat: Source -doi,doiserver,Day of Infamy -dmc,dmcserver,Deathmatch Classic -dst,dstserver,Don't Starve Together -dab,dabserver,Double Action: Boogaloo -em,emserver,Empires Mod -fctr,fctrserver,Factorio -fof,fofserver,Fistful of Frags -gmod,gmodserver,Garrys Mod -ges,gesserver,GoldenEye: Source -hl2dm,hl2dmserver,Half-Life 2: Deathmatch -hldms,hldmsserver,Half-Life Deathmatch: Source -hldm,hldmserver,Half-Life: Deathmatch -hw,hwserver,Hurtworld -ins,insserver,Insurgency -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 -mta,mtaserver,Multi Theft Auto -mumble,mumbleserver,Mumble -ns2,ns2server,Natural Selection 2 -nmrih,nmrihserver,No More Room in Hell -ns2c,ns2cserver,NS2: Combat -opfor,opforserver,Opposing Force -pvkii,pvkiiserver,Pirates Vikings & Knights II -pc,pcserver,Project Cars -pz,pzserver,Project Zomboid -q2,q2server,Quake 2 -q3,q3server,Quake 3: Arena -ql,qlserver,Quake Live -qw,qwserver,Quake World -ro,roserver,Red Orchestra: Ostfront 41-45 -ricochet,ricochetserver,Ricochet -rust,rustserver,Rust -samp,sampserver,San Andreas Multiplayer -ss3,ss3server,Serious Sam 3: BFE -sb,sbserver,Starbound -st,stserver,Stationeers -squad,squadserver,Squad -sven,svenserver,Sven Co-op -tf2,tf2server,Team Fortress 2 -tfc,tfcserver,Team Fortress Classic -ts3,ts3server,Teamspeak 3 -tw,twserver,Teeworlds -terraria,terrariaserver,Terraria -tu,tuserver,Tower Unite -ut2k4,ut2k4server,Unreal Tournament 2004 -ut3,ut3server,Unreal Tournament 3 -ut99,ut99server,Unreal Tournament 99 -wet,wetserver,Wolfenstein: Enemy Territory -zps,zpsserver,Zombie Panic! Source +arma3,arma3server,ARMA 3,test,test,test +sdtd,sdtdserver,7 Days to Die,test,, +ark,arkserver,ARK: Survival Evolved,,, +bo,boserver,Ballistic Overkill,,, +bf1942,bf1942server,Battlefield 1942,,, +bmdm,bmdmserver,Black Mesa: Deathmatch,,, +bs,bsserver,Blade Symphony,,, +bb2,bb2server,BrainBread 2,,, +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,,, +cc,ccserver,Codename CURE,,, +cs,csserver,Counter-Strike 1.6,,, +cscz,csczserver,Counter-Strike: Condition Zero,,, +csgo,csgoserver,Counter-Strike: Global Offensive,,, +css,cssserver,Counter-Strike: Source,,, +dod,dodserver,Day of Defeat,,, +dods,dodsserver,Day of Defeat: Source,,, +doi,doiserver,Day of Infamy,,, +dmc,dmcserver,Deathmatch Classic,,, +dst,dstserver,Don't Starve Together,,, +dab,dabserver,Double Action: Boogaloo,,, +em,emserver,Empires Mod,,, +fctr,fctrserver,Factorio,,, +fof,fofserver,Fistful of Frags,,, +gmod,gmodserver,Garrys Mod,,, +ges,gesserver,GoldenEye: Source,,, +hl2dm,hl2dmserver,Half-Life 2: Deathmatch,,, +hldms,hldmsserver,Half-Life Deathmatch: Source,,, +hldm,hldmserver,Half-Life: Deathmatch,,, +hw,hwserver,Hurtworld,,, +ins,insserver,Insurgency,,, +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,,, +mta,mtaserver,Multi Theft Auto,,, +mumble,mumbleserver,Mumble,,, +ns2,ns2server,Natural Selection 2,,, +nmrih,nmrihserver,No More Room in Hell,,, +ns2c,ns2cserver,NS2: Combat,,, +opfor,opforserver,Opposing Force,,, +pvkii,pvkiiserver,Pirates Vikings & Knights II,,, +pc,pcserver,Project Cars,,, +pz,pzserver,Project Zomboid,,, +q2,q2server,Quake 2,,, +q3,q3server,Quake 3: Arena,,, +ql,qlserver,Quake Live,,, +qw,qwserver,Quake World,,, +ro,roserver,Red Orchestra: Ostfront 41-45,,, +ricochet,ricochetserver,Ricochet,,, +rust,rustserver,Rust,,, +samp,sampserver,San Andreas Multiplayer,,, +ss3,ss3server,Serious Sam 3: BFE,,, +sb,sbserver,Starbound,,, +st,stserver,Stationeers,,, +squad,squadserver,Squad,,, +sven,svenserver,Sven Co-op,,, +tf2,tf2server,Team Fortress 2,,, +tfc,tfcserver,Team Fortress Classic,,, +ts3,ts3server,Teamspeak 3,,, +tw,twserver,Teeworlds,,, +terraria,terrariaserver,Terraria,,, +tu,tuserver,Tower Unite,,, +ut2k4,ut2k4server,Unreal Tournament 2004,,, +ut3,ut3server,Unreal Tournament 3,,, +ut99,ut99server,Unreal Tournament 99,,, +wet,wetserver,Wolfenstein: Enemy Territory,,, +zps,zpsserver,Zombie Panic! Source,,, From e712180b2be9d6ea91626cfab5f7d7ccdd83b162 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 7 Jan 2018 22:57:21 +0000 Subject: [PATCH 02/18] initial data added for refactor --- lgsm/data/serverlist.csv | 148 +++++++++++++++++++-------------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index a4e67716a..59195535b 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,74 +1,74 @@ -arma3,arma3server,ARMA 3,test,test,test -sdtd,sdtdserver,7 Days to Die,test,, -ark,arkserver,ARK: Survival Evolved,,, -bo,boserver,Ballistic Overkill,,, -bf1942,bf1942server,Battlefield 1942,,, -bmdm,bmdmserver,Black Mesa: Deathmatch,,, -bs,bsserver,Blade Symphony,,, -bb2,bb2server,BrainBread 2,,, -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,,, -cc,ccserver,Codename CURE,,, -cs,csserver,Counter-Strike 1.6,,, -cscz,csczserver,Counter-Strike: Condition Zero,,, -csgo,csgoserver,Counter-Strike: Global Offensive,,, -css,cssserver,Counter-Strike: Source,,, -dod,dodserver,Day of Defeat,,, -dods,dodsserver,Day of Defeat: Source,,, -doi,doiserver,Day of Infamy,,, -dmc,dmcserver,Deathmatch Classic,,, -dst,dstserver,Don't Starve Together,,, -dab,dabserver,Double Action: Boogaloo,,, -em,emserver,Empires Mod,,, -fctr,fctrserver,Factorio,,, -fof,fofserver,Fistful of Frags,,, -gmod,gmodserver,Garrys Mod,,, -ges,gesserver,GoldenEye: Source,,, -hl2dm,hl2dmserver,Half-Life 2: Deathmatch,,, -hldms,hldmsserver,Half-Life Deathmatch: Source,,, -hldm,hldmserver,Half-Life: Deathmatch,,, -hw,hwserver,Hurtworld,,, -ins,insserver,Insurgency,,, -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,,, -mta,mtaserver,Multi Theft Auto,,, -mumble,mumbleserver,Mumble,,, -ns2,ns2server,Natural Selection 2,,, -nmrih,nmrihserver,No More Room in Hell,,, -ns2c,ns2cserver,NS2: Combat,,, -opfor,opforserver,Opposing Force,,, -pvkii,pvkiiserver,Pirates Vikings & Knights II,,, -pc,pcserver,Project Cars,,, -pz,pzserver,Project Zomboid,,, -q2,q2server,Quake 2,,, -q3,q3server,Quake 3: Arena,,, -ql,qlserver,Quake Live,,, -qw,qwserver,Quake World,,, -ro,roserver,Red Orchestra: Ostfront 41-45,,, -ricochet,ricochetserver,Ricochet,,, -rust,rustserver,Rust,,, -samp,sampserver,San Andreas Multiplayer,,, -ss3,ss3server,Serious Sam 3: BFE,,, -sb,sbserver,Starbound,,, -st,stserver,Stationeers,,, -squad,squadserver,Squad,,, -sven,svenserver,Sven Co-op,,, -tf2,tf2server,Team Fortress 2,,, -tfc,tfcserver,Team Fortress Classic,,, -ts3,ts3server,Teamspeak 3,,, -tw,twserver,Teeworlds,,, -terraria,terrariaserver,Terraria,,, -tu,tuserver,Tower Unite,,, -ut2k4,ut2k4server,Unreal Tournament 2004,,, -ut3,ut3server,Unreal Tournament 3,,, -ut99,ut99server,Unreal Tournament 99,,, -wet,wetserver,Wolfenstein: Enemy Territory,,, -zps,zpsserver,Zombie Panic! Source,,, +arma3,arma3server,ARMA 3,engine,glibc,glibcfix,x86,x64,steamcmd,steamlogin,gslt,query +sdtd,sdtdserver,7 Days to Die,unity3d,2.15,n,y,n,y,y,n,y +ark,arkserver,ARK: Survival Evolved,unreal4,2.15,n,y,n,y,n,n,n +bo,boserver,Ballistic Overkill,unity3d,2.15,n,y,n,y,n,y,y +bf1942,bf1942server,Battlefield 1942,refractor,2.0,n,y,n,n,n,n,y +bmdm,bmdmserver,Black Mesa: Deathmatch,source,2.15,y,y,n,y,n,y,y +bs,bsserver,Blade Symphony,source,2.15,y,y,n,y,y,n,y +bb2,bb2server,BrainBread 2,source,2.17,n,y,n,y,n,y,y +cod,codserver,Call of Duty,idtech3,2.1,n,y,n,n,n,n,y +cod2,cod2server,Call of Duty 2,iw2.0,2.1.3,n,y,n,n,n,n,y +cod4,cod4server,Call of Duty 4,iw3.0,2.3,n,y,n,n,n,n,y +coduo,coduoserver,Call of Duty: United Offensive,idtech3,2.1,n,y,n,n,n,n,y +codwaw,codwawserver,Call of Duty: World at War,iw3.0,2.3.2,n,y,n,n,n,n,y +cc,ccserver,Codename CURE,source,2.15,n,y,n,y,n,n,y +cs,csserver,Counter-Strike 1.6,goldsource,2.3.6,n,y,n,y,n,n,y +cscz,csczserver,Counter-Strike: Condition Zero,goldsource,2.3.6,n,y,n,y,n,n,y +csgo,csgoserver,Counter-Strike: Global Offensive,source,2.15,n,y,n,y,n,y,y +css,cssserver,Counter-Strike: Source,source,2.3.6,n,y,n,y,n,y,y +dod,dodserver,Day of Defeat,goldsource,2.3.6,n,y,n,y,n,n,y +dods,dodsserver,Day of Defeat: Source,source,2.3.6,n,y,n,y,n,n,y +doi,doiserver,Day of Infamy,source,2.15,y,y,n,y,n,n,y +dmc,dmcserver,Deathmatch Classic,goldsource,2.3.6,n,y,n,y,n,n,y +dst,dstserver,Don't Starve Together,dontstarve,2.15,n,y,n,y,n,n,n +dab,dabserver,Double Action: Boogaloo,source,2.15,y,y,n,y,n,n,y +em,emserver,Empires Mod,source,2.15,y,y,n,y,n,y,y +fctr,fctrserver,Factorio,factorio,2.15,n,n,y,n,n,n,n +fof,fofserver,Fistful of Frags,source,2.15,y,y,n,y,n,n,y +gmod,gmodserver,Garrys Mod,source,2.15,y,y,n,y,n,y,y +ges,gesserver,GoldenEye: Source,source,2.15,y,y,n,n,n,n,y +hl2dm,hl2dmserver,Half-Life 2: Deathmatch,source,2.3.6,n,y,n,y,n,n,y +hldms,hldmsserver,Half-Life Deathmatch: Source,source,2.3.6,n,y,n,y,n,n,y +hldm,hldmserver,Half-Life: Deathmatch,goldsource,2.3.6,n,y,n,y,n,n,y +hw,hwserver,Hurtworld,unity3d,2.15,n,y,y,y,n,n,y +ins,insserver,Insurgency,source,2.15,y,y,n,y,n,y,y +jc2,jc2server,Just Cause 2,avalanche2.0,2.13,y,y,n,y,n,n,y +jc3,jc3server,Just Cause 3,avalanche3.0,2.17,n,y,n,y,n,n,y +kf,kfserver,Killing Floor,unreal2,2.4,n,y,n,y,y,n,y +kf2,kf2server,Killing Floor 2,unreal3,2.17,n,y,n,y,n,n,n +l4d,l4dserver,Left 4 Dead,source,2.3.6,n,y,n,y,n,n,y +l4d2,l4d2server,Left 4 Dead 2,source,2.3.6,n,y,n,y,n,n,y +mc,mcserver,Minecraft,lwjgl2,null,n,y,n,n,n,n,n +mta,mtaserver,Multi Theft Auto,renderware,2.7,n,y,n,n,n,n,n +mumble,mumbleserver,Mumble,null,null,n,y,n,n,n,n,n +ns2,ns2server,Natural Selection 2,spark,2.17,n,n,y,y,y,n,y +nmrih,nmrihserver,No More Room in Hell,source,2.15,y,y,n,y,n,y,y +ns2c,ns2cserver,NS2: Combat,spark,2.15,y,y,n,y,n,n,y +opfor,opforserver,Opposing Force,goldsource,2.3.6,n,y,n,y,n,n,y +pvkii,pvkiiserver,Pirates Vikings & Knights II,source,2.3.6,n,y,n,y,n,n,y +pc,pcserver,Project Cars,madness,2.4,n,y,n,y,n,n,y +pz,pzserver,Project Zomboid,projectzomboid,2.15,n,y,n,y,n,n,n +q2,q2server,Quake 2,idtech2,null,n,y,n,n,n,n,n +q3,q3server,Quake 3: Arena,idtech3,2.1,n,y,n,n,n,n,y +ql,qlserver,Quake Live,idtech3_ql,2.15,n,y,y,y,n,n,y +qw,qwserver,Quake World,quake,2.14,n,y,n,n,n,n,n +ro,roserver,Red Orchestra: Ostfront 41-45,unreal2,2.4,n,y,n,y,n,n,y +ricochet,ricochetserver,Ricochet,goldsource,2.3.6,n,y,n,y,n,n,y +rust,rustserver,Rust,unity3d,2.15,n,y,n,y,n,n,y +samp,sampserver,San Andreas Multiplayer,renderware,2.3,n,y,n,n,n,n,n +ss3,ss3server,Serious Sam 3: BFE,seriousengine35,2.13,y,y,n,y,n,n,n +sb,sbserver,Starbound,starbound,2.17,n,y,n,y,y,n,y +st,stserver,Stationeers,unity3d,2.15,n,y,n,y,n,n,y +squad,squadserver,Squad,unreal4,2.17,n,y,n,y,n,n,n +sven,svenserver,Sven Co-op,goldsource,2.18,n,y,n,y,n,n,y +tf2,tf2server,Team Fortress 2,source,2.15,y,y,n,y,n,y,y +tfc,tfcserver,Team Fortress Classic,goldsource,2.3.6,n,y,n,y,n,n,y +ts3,ts3server,Teamspeak 3,null,null,n,y,n,n,n,n,n +tw,twserver,Teeworlds,teeworlds,2.14,n,y,n,y,y,n,n +terraria,terrariaserver,Terraria,terraria,2.7,n,y,n,y,y,n,n +tu,tuserver,Tower Unite,unreal4,2.14,n,y,n,y,n,n,n +ut2k4,ut2k4server,Unreal Tournament 2004,unreal2,2.4,n,y,n,n,n,n,y +ut3,ut3server,Unreal Tournament 3,unreal3,2.3.2,n,y,n,n,n,n,n +ut99,ut99server,Unreal Tournament 99,unreal,2.1,n,y,n,n,n,n,y +wet,wetserver,Wolfenstein: Enemy Territory,idtech3,2.2.4,n,y,n,n,n,n,y +zps,zpsserver,Zombie Panic! Source,source,2.15,n,y,n,y,n,n,y From 8524eeec94478665439e58074ee302d4be0dfc94 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 7 Jan 2018 23:05:47 +0000 Subject: [PATCH 03/18] moved datadir out of tmpdir --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 3c4ec12cb..9527116d0 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -273,7 +273,7 @@ fi # LinuxGSM installer mode if [ "${shortname}" == "core" ]; then userinput=$1 - datadir="${tmpdir}/data" + datadir="${lgsmdir}/data" serverlist="${datadir}/serverlist.csv" # Download the latest serverlist. This is the complete list of all supported servers. From cb6f2b855eed21ec00d100639f48ec43699f1c7d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 7 Jan 2018 23:12:39 +0000 Subject: [PATCH 04/18] corrected x64 support for some servers --- lgsm/data/serverlist.csv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 59195535b..bf4839853 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -35,11 +35,11 @@ ins,insserver,Insurgency,source,2.15,y,y,n,y,n,y,y jc2,jc2server,Just Cause 2,avalanche2.0,2.13,y,y,n,y,n,n,y jc3,jc3server,Just Cause 3,avalanche3.0,2.17,n,y,n,y,n,n,y kf,kfserver,Killing Floor,unreal2,2.4,n,y,n,y,y,n,y -kf2,kf2server,Killing Floor 2,unreal3,2.17,n,y,n,y,n,n,n +kf2,kf2server,Killing Floor 2,unreal3,2.17,n,n,y,y,n,n,n l4d,l4dserver,Left 4 Dead,source,2.3.6,n,y,n,y,n,n,y l4d2,l4d2server,Left 4 Dead 2,source,2.3.6,n,y,n,y,n,n,y mc,mcserver,Minecraft,lwjgl2,null,n,y,n,n,n,n,n -mta,mtaserver,Multi Theft Auto,renderware,2.7,n,y,n,n,n,n,n +mta,mtaserver,Multi Theft Auto,renderware,2.7,n,y,y,n,n,n,n mumble,mumbleserver,Mumble,null,null,n,y,n,n,n,n,n ns2,ns2server,Natural Selection 2,spark,2.17,n,n,y,y,y,n,y nmrih,nmrihserver,No More Room in Hell,source,2.15,y,y,n,y,n,y,y @@ -58,7 +58,7 @@ rust,rustserver,Rust,unity3d,2.15,n,y,n,y,n,n,y samp,sampserver,San Andreas Multiplayer,renderware,2.3,n,y,n,n,n,n,n ss3,ss3server,Serious Sam 3: BFE,seriousengine35,2.13,y,y,n,y,n,n,n sb,sbserver,Starbound,starbound,2.17,n,y,n,y,y,n,y -st,stserver,Stationeers,unity3d,2.15,n,y,n,y,n,n,y +st,stserver,Stationeers,unity3d,2.15,n,n,y,y,n,n,y squad,squadserver,Squad,unreal4,2.17,n,y,n,y,n,n,n sven,svenserver,Sven Co-op,goldsource,2.18,n,y,n,y,n,n,y tf2,tf2server,Team Fortress 2,source,2.15,y,y,n,y,n,y,y From 2e1082bd50e0e50193e9044cd1a9a0af276f7c31 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 Jan 2018 21:11:27 +0000 Subject: [PATCH 05/18] added datadir and serverlist vars to main vars --- linuxgsm.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linuxgsm.sh b/linuxgsm.sh index 9527116d0..4f1bd9321 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -35,6 +35,8 @@ serverfiles="${rootdir}/serverfiles" functionsdir="${lgsmdir}/functions" libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" +datadir="${lgsmdir}/data" +serverlist="${datadir}/serverlist.csv" configdir="${lgsmdir}/config-lgsm" configdirserver="${configdir}/${gameservername}" configdirdefault="${lgsmdir}/config-default" From a8388a03ec34ec8693045a40b0be6f8bb9265677 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 Jan 2018 21:13:54 +0000 Subject: [PATCH 06/18] info_glibc is now just two variables. Will eventually become deprecated --- lgsm/functions/info_glibc.sh | 182 +---------------------------------- 1 file changed, 2 insertions(+), 180 deletions(-) diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index b04f79644..22035b8d8 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -6,183 +6,5 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -if [ "${gamename}" == "ARK: Survival Evolved" ]; then - glibcrequired="2.15" - glibcfix="no" -elif [ "${gamename}" == "Ballistic Overkill" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Black Mesa: Deathmatch" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Blade Symphony" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "BrainBread 2" ]; then - glibcrequired="2.17" -elif [ "${gamename}" == "Call of Duty" ]; then - glibcrequired="2.1" - glibcfix="no" -elif [ "${gamename}" == "Call of Duty 2" ]; then - glibcrequired="2.1.3" - glibcfix="no" -elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then - glibcrequired="2.1" - glibcfix="no" -elif [ "${gamename}" == "Call of Duty 4" ]; then - glibcrequired="2.3" - glibcfix="no" -elif [ "${gamename}" == "Call of Duty: World at War" ]; then - glibcrequired="2.3.2" - glibcfix="no" -elif [ "${gamename}" == "Codename CURE" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Counter-Strike: Global Offensive" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Day of Infamy" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Double Action: Boogaloo" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Empires Mod" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Factorio" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Fistful of Frags" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Garry's Mod" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "GoldenEye: Source" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Insurgency" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${shortname}" == "kf2" ]; then - glibcrequired="2.17" - glibcfix="no" -elif [ "${gamename}" == "Mumble" ]; then - glibcrequired="NOT REQUIRED" - glibcfix="no" -elif [ "${gamename}" == "No More Room in Hell" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Project Cars" ]; then - glibcrequired="2.4" - glibcfix="no" -elif [ "${gamename}" == "Pirates, Vikings, and Knights II" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "Quake 2" ]; then - glibcrequired="NOT REQUIRED" - glibcfix="no" -elif [ "${gamename}" == "Quake 3: Arena" ]; then - glibcrequired="2.1" - glibcfix="no" -elif [ "${gamename}" == "Quake Live" ]; then - glibcrequired="2.15" - glibcfix="no" -elif [ "${gamename}" == "San Andreas Multiplayer" ]; then - glibcrequired="2.3" - glibcfix="no" -elif [ "${gamename}" == "Squad" ]; then - glibcrequired="2.17" - glibcfix="no" -elif [ "${gamename}" == "Sven Co-op" ]; then - glibcrequired="2.18" - glibcfix="no" -elif [ "${gamename}" == "Team Fortress 2" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${gamename}" == "TeamSpeak 3" ]; then - glibcrequired="NOT REQUIRED" - glibcfix="no" -elif [ "${gamename}" == "Teeworlds" ]; then - glibcrequired="2.14" - glibcfix="no" -elif [ "${gamename}" == "Just Cause 2" ]; then - glibcrequired="2.13" - glibcfix="yes" -elif [ "${gamename}" == "Just Cause 3" ]; then - glibcrequired="2.17" - glibcfix="no" -elif [ "${engine}" == "dontstarve" ]; then - glibcrequired="2.15" - glibcfix="no" -elif [ "${engine}" == "lwjgl2" ]; then - glibcrequired="NOT REQUIRED" - glibcfix="no" -elif [ "${engine}" == "projectzomboid" ]; then - glibcrequired="2.15" - glibcfix="no" -elif [ "${engine}" == "realvirtuality" ]; then - glibcrequired="2.13" - glibcfix="yes" -elif [ "${engine}" == "seriousengine35" ]; then - glibcrequired="2.13" - glibcfix="yes" -elif [ "${engine}" == "source" ]; then - glibcrequired="2.3.6" - glibcfix="no" -elif [ "${engine}" == "goldsource" ]; then - glibcrequired="2.3.4" - glibcfix="no" -elif [ "${gamename}" == "Natural Selection 2" ]; then - glibcrequired="2.17" - glibcfix="no" -elif [ "${gamename}" == "NS2: Combat" ]; then - glibcrequired="2.15" - glibcfix="yes" -elif [ "${engine}" == "starbound" ]; then - glibcrequired="2.17" - glibcfix="no" -elif [ "${engine}" == "quake" ]; then - glibcrequired="2.0" - glibcfix="no" -elif [ "${engine}" == "terraria" ]; then - glibcrequired="2.7" - glibcfix="no" -elif [ "${engine}" == "unreal" ]; then - glibcrequired="2.1" - glibcfix="no" -elif [ "${engine}" == "unreal2" ]; then - glibcrequired="2.4" - glibcfix="no" -elif [ "${engine}" == "unreal3" ]; then - glibcrequired="2.3.2" - glibcfix="no" -elif [ "${engine}" == "unreal4" ]; then - glibcrequired="2.14" - glibcfix="no" -elif [ "${engine}" == "unity3d" ]; then - glibcrequired="2.15" - glibcfix="no" -elif [ "${gamename}" == "TeamSpeak 3" ]; then - glibcrequired="NOT REQUIRED" - glibcfix="no" -elif [ "${gamename}" == "Mumble" ]; then - glibcrequired="NOT REQUIRED" - glibcfix="no" -elif [ "${engine}" == "refractor" ]; then - glibcrequired="2.0" - glibcfix="no" -elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then - glibcrequired="2.2.4" - glibcfix="no" -elif [ "${gamename}" == "Multi Theft Auto" ]; then - glibcrequired="2.7" - glibcfix="no" -elif [ "${gamename}" == "Zombie Panic! Source" ]; then - glibcrequired="2.15" - glibcfix="yes" -else - glibcrequired="UNKNOWN" - glibcfix="no" -fi +glibcrequired=$(grep "${shortname}" "${serverlist}" | awk -F "," '{ print $5 }') +glibcfix=$(grep "${shortname}" "${serverlist}" | awk -F "," '{ print $6 }') \ No newline at end of file From 89bcac807fc0909fe4a526269f22c5fad5a95b25 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 Jan 2018 22:02:41 +0000 Subject: [PATCH 07/18] tidy up --- lgsm/config-default/config-lgsm/boserver/_default.cfg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index f1712d72e..60e3f1bb0 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -14,9 +14,12 @@ gslt="" ip="" +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +ip="" + ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms=" -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" +parms="-batchmode -nographics -dedicated -configfile=${servercfgfullpath}" } #### LinuxGSM Settings #### From 85878e854a1e834d889870fd875b4748ecf15cfc Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 8 Jan 2018 22:21:56 +0000 Subject: [PATCH 08/18] Tower Unite GSLT --- lgsm/data/serverlist.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index bf4839853..d32800d3c 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -66,7 +66,7 @@ tfc,tfcserver,Team Fortress Classic,goldsource,2.3.6,n,y,n,y,n,n,y ts3,ts3server,Teamspeak 3,null,null,n,y,n,n,n,n,n tw,twserver,Teeworlds,teeworlds,2.14,n,y,n,y,y,n,n terraria,terrariaserver,Terraria,terraria,2.7,n,y,n,y,y,n,n -tu,tuserver,Tower Unite,unreal4,2.14,n,y,n,y,n,n,n +tu,tuserver,Tower Unite,unreal4,2.14,n,y,n,y,n,y,n ut2k4,ut2k4server,Unreal Tournament 2004,unreal2,2.4,n,y,n,n,n,n,y ut3,ut3server,Unreal Tournament 3,unreal3,2.3.2,n,y,n,n,n,n,n ut99,ut99server,Unreal Tournament 99,unreal,2.1,n,y,n,n,n,n,y From e6eb7eeb61b17f99c7aca93b576ecf8ac0753b4f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 Feb 2019 19:11:15 +0000 Subject: [PATCH 09/18] feat: update serverlist.csv --- lgsm/data/serverlist.csv | 149 ++++++++++++++++++++------------------- 1 file changed, 75 insertions(+), 74 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index d32800d3c..3204c89ce 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,74 +1,75 @@ -arma3,arma3server,ARMA 3,engine,glibc,glibcfix,x86,x64,steamcmd,steamlogin,gslt,query -sdtd,sdtdserver,7 Days to Die,unity3d,2.15,n,y,n,y,y,n,y -ark,arkserver,ARK: Survival Evolved,unreal4,2.15,n,y,n,y,n,n,n -bo,boserver,Ballistic Overkill,unity3d,2.15,n,y,n,y,n,y,y -bf1942,bf1942server,Battlefield 1942,refractor,2.0,n,y,n,n,n,n,y -bmdm,bmdmserver,Black Mesa: Deathmatch,source,2.15,y,y,n,y,n,y,y -bs,bsserver,Blade Symphony,source,2.15,y,y,n,y,y,n,y -bb2,bb2server,BrainBread 2,source,2.17,n,y,n,y,n,y,y -cod,codserver,Call of Duty,idtech3,2.1,n,y,n,n,n,n,y -cod2,cod2server,Call of Duty 2,iw2.0,2.1.3,n,y,n,n,n,n,y -cod4,cod4server,Call of Duty 4,iw3.0,2.3,n,y,n,n,n,n,y -coduo,coduoserver,Call of Duty: United Offensive,idtech3,2.1,n,y,n,n,n,n,y -codwaw,codwawserver,Call of Duty: World at War,iw3.0,2.3.2,n,y,n,n,n,n,y -cc,ccserver,Codename CURE,source,2.15,n,y,n,y,n,n,y -cs,csserver,Counter-Strike 1.6,goldsource,2.3.6,n,y,n,y,n,n,y -cscz,csczserver,Counter-Strike: Condition Zero,goldsource,2.3.6,n,y,n,y,n,n,y -csgo,csgoserver,Counter-Strike: Global Offensive,source,2.15,n,y,n,y,n,y,y -css,cssserver,Counter-Strike: Source,source,2.3.6,n,y,n,y,n,y,y -dod,dodserver,Day of Defeat,goldsource,2.3.6,n,y,n,y,n,n,y -dods,dodsserver,Day of Defeat: Source,source,2.3.6,n,y,n,y,n,n,y -doi,doiserver,Day of Infamy,source,2.15,y,y,n,y,n,n,y -dmc,dmcserver,Deathmatch Classic,goldsource,2.3.6,n,y,n,y,n,n,y -dst,dstserver,Don't Starve Together,dontstarve,2.15,n,y,n,y,n,n,n -dab,dabserver,Double Action: Boogaloo,source,2.15,y,y,n,y,n,n,y -em,emserver,Empires Mod,source,2.15,y,y,n,y,n,y,y -fctr,fctrserver,Factorio,factorio,2.15,n,n,y,n,n,n,n -fof,fofserver,Fistful of Frags,source,2.15,y,y,n,y,n,n,y -gmod,gmodserver,Garrys Mod,source,2.15,y,y,n,y,n,y,y -ges,gesserver,GoldenEye: Source,source,2.15,y,y,n,n,n,n,y -hl2dm,hl2dmserver,Half-Life 2: Deathmatch,source,2.3.6,n,y,n,y,n,n,y -hldms,hldmsserver,Half-Life Deathmatch: Source,source,2.3.6,n,y,n,y,n,n,y -hldm,hldmserver,Half-Life: Deathmatch,goldsource,2.3.6,n,y,n,y,n,n,y -hw,hwserver,Hurtworld,unity3d,2.15,n,y,y,y,n,n,y -ins,insserver,Insurgency,source,2.15,y,y,n,y,n,y,y -jc2,jc2server,Just Cause 2,avalanche2.0,2.13,y,y,n,y,n,n,y -jc3,jc3server,Just Cause 3,avalanche3.0,2.17,n,y,n,y,n,n,y -kf,kfserver,Killing Floor,unreal2,2.4,n,y,n,y,y,n,y -kf2,kf2server,Killing Floor 2,unreal3,2.17,n,n,y,y,n,n,n -l4d,l4dserver,Left 4 Dead,source,2.3.6,n,y,n,y,n,n,y -l4d2,l4d2server,Left 4 Dead 2,source,2.3.6,n,y,n,y,n,n,y -mc,mcserver,Minecraft,lwjgl2,null,n,y,n,n,n,n,n -mta,mtaserver,Multi Theft Auto,renderware,2.7,n,y,y,n,n,n,n -mumble,mumbleserver,Mumble,null,null,n,y,n,n,n,n,n -ns2,ns2server,Natural Selection 2,spark,2.17,n,n,y,y,y,n,y -nmrih,nmrihserver,No More Room in Hell,source,2.15,y,y,n,y,n,y,y -ns2c,ns2cserver,NS2: Combat,spark,2.15,y,y,n,y,n,n,y -opfor,opforserver,Opposing Force,goldsource,2.3.6,n,y,n,y,n,n,y -pvkii,pvkiiserver,Pirates Vikings & Knights II,source,2.3.6,n,y,n,y,n,n,y -pc,pcserver,Project Cars,madness,2.4,n,y,n,y,n,n,y -pz,pzserver,Project Zomboid,projectzomboid,2.15,n,y,n,y,n,n,n -q2,q2server,Quake 2,idtech2,null,n,y,n,n,n,n,n -q3,q3server,Quake 3: Arena,idtech3,2.1,n,y,n,n,n,n,y -ql,qlserver,Quake Live,idtech3_ql,2.15,n,y,y,y,n,n,y -qw,qwserver,Quake World,quake,2.14,n,y,n,n,n,n,n -ro,roserver,Red Orchestra: Ostfront 41-45,unreal2,2.4,n,y,n,y,n,n,y -ricochet,ricochetserver,Ricochet,goldsource,2.3.6,n,y,n,y,n,n,y -rust,rustserver,Rust,unity3d,2.15,n,y,n,y,n,n,y -samp,sampserver,San Andreas Multiplayer,renderware,2.3,n,y,n,n,n,n,n -ss3,ss3server,Serious Sam 3: BFE,seriousengine35,2.13,y,y,n,y,n,n,n -sb,sbserver,Starbound,starbound,2.17,n,y,n,y,y,n,y -st,stserver,Stationeers,unity3d,2.15,n,n,y,y,n,n,y -squad,squadserver,Squad,unreal4,2.17,n,y,n,y,n,n,n -sven,svenserver,Sven Co-op,goldsource,2.18,n,y,n,y,n,n,y -tf2,tf2server,Team Fortress 2,source,2.15,y,y,n,y,n,y,y -tfc,tfcserver,Team Fortress Classic,goldsource,2.3.6,n,y,n,y,n,n,y -ts3,ts3server,Teamspeak 3,null,null,n,y,n,n,n,n,n -tw,twserver,Teeworlds,teeworlds,2.14,n,y,n,y,y,n,n -terraria,terrariaserver,Terraria,terraria,2.7,n,y,n,y,y,n,n -tu,tuserver,Tower Unite,unreal4,2.14,n,y,n,y,n,y,n -ut2k4,ut2k4server,Unreal Tournament 2004,unreal2,2.4,n,y,n,n,n,n,y -ut3,ut3server,Unreal Tournament 3,unreal3,2.3.2,n,y,n,n,n,n,n -ut99,ut99server,Unreal Tournament 99,unreal,2.1,n,y,n,n,n,n,y -wet,wetserver,Wolfenstein: Enemy Territory,idtech3,2.2.4,n,y,n,n,n,n,y -zps,zpsserver,Zombie Panic! Source,source,2.15,n,y,n,y,n,n,y +shortname,servername,gamename,engine,glibc,x86,x64,steamcmd,steamlogin,gslt,query +arma3,arma3server,ARMA 3,realvirtuality,2.13,y,n,y,y,n,y +sdtd,sdtdserver,7 Days to Die,unity3d,2.15,y,n,y,y,n,y +ark,arkserver,ARK: Survival Evolved,unreal4,2.15,y,n,y,n,n,n +bo,boserver,Ballistic Overkill,unity3d,2.15,y,n,y,n,y,y +bf1942,bf1942server,Battlefield 1942,refractor,2,y,n,n,n,n,y +bmdm,bmdmserver,Black Mesa: Deathmatch,source,2.15,y,n,y,n,y,y +bs,bsserver,Blade Symphony,source,2.15,y,n,y,y,n,y +bb2,bb2server,BrainBread 2,source,2.17,y,n,y,n,y,y +cod,codserver,Call of Duty,idtech3,2.1,y,n,n,n,n,y +cod2,cod2server,Call of Duty 2,iw2.0,2.1.3,y,n,n,n,n,y +cod4,cod4server,Call of Duty 4,iw3.0,2.3,y,n,n,n,n,y +coduo,coduoserver,Call of Duty: United Offensive,idtech3,2.1,y,n,n,n,n,y +codwaw,codwawserver,Call of Duty: World at War,iw3.0,2.3.2,y,n,n,n,n,y +cc,ccserver,Codename CURE,source,2.15,y,n,y,n,n,y +cs,csserver,Counter-Strike 1.6,goldsource,2.3.6,y,n,y,n,n,y +cscz,csczserver,Counter-Strike: Condition Zero,goldsource,2.3.6,y,n,y,n,n,y +csgo,csgoserver,Counter-Strike: Global Offensive,source,2.15,y,n,y,n,y,y +css,cssserver,Counter-Strike: Source,source,2.3.6,y,n,y,n,y,y +dod,dodserver,Day of Defeat,goldsource,2.3.6,y,n,y,n,n,y +dods,dodsserver,Day of Defeat: Source,source,2.3.6,y,n,y,n,n,y +doi,doiserver,Day of Infamy,source,2.15,y,n,y,n,n,y +dmc,dmcserver,Deathmatch Classic,goldsource,2.3.6,y,n,y,n,n,y +dst,dstserver,Don't Starve Together,dontstarve,2.15,y,n,y,n,n,n +dab,dabserver,Double Action: Boogaloo,source,2.15,y,n,y,n,n,y +em,emserver,Empires Mod,source,2.15,y,n,y,n,y,y +fctr,fctrserver,Factorio,factorio,2.15,n,y,n,n,n,n +fof,fofserver,Fistful of Frags,source,2.15,y,n,y,n,n,y +gmod,gmodserver,Garrys Mod,source,2.15,y,n,y,n,y,y +ges,gesserver,GoldenEye: Source,source,2.15,y,n,n,n,n,y +hl2dm,hl2dmserver,Half-Life 2: Deathmatch,source,2.3.6,y,n,y,n,n,y +hldms,hldmsserver,Half-Life Deathmatch: Source,source,2.3.6,y,n,y,n,n,y +hldm,hldmserver,Half-Life: Deathmatch,goldsource,2.3.6,y,n,y,n,n,y +hw,hwserver,Hurtworld,unity3d,2.15,y,y,y,n,n,y +ins,insserver,Insurgency,source,2.15,y,n,y,n,y,y +jc2,jc2server,Just Cause 2,avalanche2.0,2.13,y,n,y,n,n,y +jc3,jc3server,Just Cause 3,avalanche3.0,2.17,y,n,y,n,n,y +kf,kfserver,Killing Floor,unreal2,2.4,y,n,y,y,n,y +kf2,kf2server,Killing Floor 2,unreal3,2.17,n,y,y,n,n,n +l4d,l4dserver,Left 4 Dead,source,2.3.6,y,n,y,n,n,y +l4d2,l4d2server,Left 4 Dead 2,source,2.3.6,y,n,y,n,n,y +mc,mcserver,Minecraft,lwjgl2,null,y,n,n,n,n,n +mta,mtaserver,Multi Theft Auto,renderware,2.7,y,y,n,n,n,n +mumble,mumbleserver,Mumble,null,null,y,n,n,n,n,n +ns2,ns2server,Natural Selection 2,spark,2.17,n,y,y,y,n,y +nmrih,nmrihserver,No More Room in Hell,source,2.15,y,n,y,n,y,y +ns2c,ns2cserver,NS2: Combat,spark,2.15,y,n,y,n,n,y +opfor,opforserver,Opposing Force,goldsource,2.3.6,y,n,y,n,n,y +pvkii,pvkiiserver,Pirates Vikings & Knights II,source,2.3.6,y,n,y,n,n,y +pc,pcserver,Project Cars,madness,2.4,y,n,y,n,n,y +pz,pzserver,Project Zomboid,projectzomboid,2.15,y,n,y,n,n,n +q2,q2server,Quake 2,idtech2,null,y,n,n,n,n,n +q3,q3server,Quake 3: Arena,idtech3,2.1,y,n,n,n,n,y +ql,qlserver,Quake Live,idtech3_ql,2.15,y,y,y,n,n,y +qw,qwserver,Quake World,quake,2.14,y,n,n,n,n,n +ro,roserver,Red Orchestra: Ostfront 41-45,unreal2,2.4,y,n,y,n,n,y +ricochet,ricochetserver,Ricochet,goldsource,2.3.6,y,n,y,n,n,y +rust,rustserver,Rust,unity3d,2.15,y,n,y,n,n,y +samp,sampserver,San Andreas Multiplayer,renderware,2.3,y,n,n,n,n,n +ss3,ss3server,Serious Sam 3: BFE,seriousengine35,2.13,y,n,y,n,n,n +sb,sbserver,Starbound,starbound,2.17,y,n,y,y,n,y +st,stserver,Stationeers,unity3d,2.15,n,y,y,n,n,y +squad,squadserver,Squad,unreal4,2.17,y,n,y,n,n,n +sven,svenserver,Sven Co-op,goldsource,2.18,y,n,y,n,n,y +tf2,tf2server,Team Fortress 2,source,2.15,y,n,y,n,y,y +tfc,tfcserver,Team Fortress Classic,goldsource,2.3.6,y,n,y,n,n,y +ts3,ts3server,Teamspeak 3,null,null,y,n,n,n,n,n +tw,twserver,Teeworlds,teeworlds,2.14,y,n,y,y,n,n +terraria,terrariaserver,Terraria,terraria,2.7,y,n,y,y,n,n +tu,tuserver,Tower Unite,unreal4,2.14,y,n,y,n,y,n +ut2k4,ut2k4server,Unreal Tournament 2004,unreal2,2.4,y,n,n,n,n,y +ut3,ut3server,Unreal Tournament 3,unreal3,2.3.2,y,n,n,n,n,n +ut99,ut99server,Unreal Tournament 99,unreal,2.1,y,n,n,n,n,y +wet,wetserver,Wolfenstein: Enemy Territory,idtech3,2.2.4,y,n,n,n,n,y +zps,zpsserver,Zombie Panic! Source,source,2.15,y,n,y,n,n,y From 21c035aa283ded2ef424d3310972c4706412215a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 Feb 2019 19:25:10 +0000 Subject: [PATCH 10/18] feat: ignore first line of serverlist.csv --- linuxgsm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index cbccd45e6..757ac5493 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -287,7 +287,7 @@ if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "list" ]; then { - awk -F "," '{print $2 "\t" $3}' "${serverlist}" + tail -n +2 "${serverlist}"|awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then From 41561deac9c6e06dee1c8ca5e6c49c558a17f3da Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 Feb 2019 19:49:03 +0000 Subject: [PATCH 11/18] fix: refactor --- linuxgsm.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 757ac5493..904e78577 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -275,9 +275,6 @@ fi # LinuxGSM installer mode if [ "${shortname}" == "core" ]; then - datadir="${tmpdir}/data" - serverlist="${datadir}/serverlist.csv" - # Download the latest serverlist. This is the complete list of all supported servers. fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" if [ ! -f "${serverlist}" ]; then From e2fb91aeabcf25ac7df5aac82111073c4c6c74a9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 Feb 2019 19:49:26 +0000 Subject: [PATCH 12/18] feat: glibc data now pulled from serverlist.csv --- lgsm/functions/info_glibc.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 2ca239991..b33d979b5 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -6,5 +6,4 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -glibcrequired=$(grep "${shortname}" "${serverlist}" | awk -F "," '{ print $5 }') -glibcfix=$(grep "${shortname}" "${serverlist}" | awk -F "," '{ print $6 }') \ No newline at end of file +glibcrequired=$(awk -F "," '{ print $1,$5 }' "${serverlist}" | grep "${shortname}" ) \ No newline at end of file From a9a911c07426f55be72a60ab60b06e106c2ba871 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 2 Mar 2019 20:49:49 +0000 Subject: [PATCH 13/18] feat(servelist): add data to serverlist New data added to serverlist.csv. In future will be start to become easier to add servers as info can be added in to serverlist instead. This will happen over time --- lgsm/data/serverlist.csv | 164 +++++++++++++++++++++------------------ 1 file changed, 89 insertions(+), 75 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 3204c89ce..725b483d4 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,75 +1,89 @@ -shortname,servername,gamename,engine,glibc,x86,x64,steamcmd,steamlogin,gslt,query -arma3,arma3server,ARMA 3,realvirtuality,2.13,y,n,y,y,n,y -sdtd,sdtdserver,7 Days to Die,unity3d,2.15,y,n,y,y,n,y -ark,arkserver,ARK: Survival Evolved,unreal4,2.15,y,n,y,n,n,n -bo,boserver,Ballistic Overkill,unity3d,2.15,y,n,y,n,y,y -bf1942,bf1942server,Battlefield 1942,refractor,2,y,n,n,n,n,y -bmdm,bmdmserver,Black Mesa: Deathmatch,source,2.15,y,n,y,n,y,y -bs,bsserver,Blade Symphony,source,2.15,y,n,y,y,n,y -bb2,bb2server,BrainBread 2,source,2.17,y,n,y,n,y,y -cod,codserver,Call of Duty,idtech3,2.1,y,n,n,n,n,y -cod2,cod2server,Call of Duty 2,iw2.0,2.1.3,y,n,n,n,n,y -cod4,cod4server,Call of Duty 4,iw3.0,2.3,y,n,n,n,n,y -coduo,coduoserver,Call of Duty: United Offensive,idtech3,2.1,y,n,n,n,n,y -codwaw,codwawserver,Call of Duty: World at War,iw3.0,2.3.2,y,n,n,n,n,y -cc,ccserver,Codename CURE,source,2.15,y,n,y,n,n,y -cs,csserver,Counter-Strike 1.6,goldsource,2.3.6,y,n,y,n,n,y -cscz,csczserver,Counter-Strike: Condition Zero,goldsource,2.3.6,y,n,y,n,n,y -csgo,csgoserver,Counter-Strike: Global Offensive,source,2.15,y,n,y,n,y,y -css,cssserver,Counter-Strike: Source,source,2.3.6,y,n,y,n,y,y -dod,dodserver,Day of Defeat,goldsource,2.3.6,y,n,y,n,n,y -dods,dodsserver,Day of Defeat: Source,source,2.3.6,y,n,y,n,n,y -doi,doiserver,Day of Infamy,source,2.15,y,n,y,n,n,y -dmc,dmcserver,Deathmatch Classic,goldsource,2.3.6,y,n,y,n,n,y -dst,dstserver,Don't Starve Together,dontstarve,2.15,y,n,y,n,n,n -dab,dabserver,Double Action: Boogaloo,source,2.15,y,n,y,n,n,y -em,emserver,Empires Mod,source,2.15,y,n,y,n,y,y -fctr,fctrserver,Factorio,factorio,2.15,n,y,n,n,n,n -fof,fofserver,Fistful of Frags,source,2.15,y,n,y,n,n,y -gmod,gmodserver,Garrys Mod,source,2.15,y,n,y,n,y,y -ges,gesserver,GoldenEye: Source,source,2.15,y,n,n,n,n,y -hl2dm,hl2dmserver,Half-Life 2: Deathmatch,source,2.3.6,y,n,y,n,n,y -hldms,hldmsserver,Half-Life Deathmatch: Source,source,2.3.6,y,n,y,n,n,y -hldm,hldmserver,Half-Life: Deathmatch,goldsource,2.3.6,y,n,y,n,n,y -hw,hwserver,Hurtworld,unity3d,2.15,y,y,y,n,n,y -ins,insserver,Insurgency,source,2.15,y,n,y,n,y,y -jc2,jc2server,Just Cause 2,avalanche2.0,2.13,y,n,y,n,n,y -jc3,jc3server,Just Cause 3,avalanche3.0,2.17,y,n,y,n,n,y -kf,kfserver,Killing Floor,unreal2,2.4,y,n,y,y,n,y -kf2,kf2server,Killing Floor 2,unreal3,2.17,n,y,y,n,n,n -l4d,l4dserver,Left 4 Dead,source,2.3.6,y,n,y,n,n,y -l4d2,l4d2server,Left 4 Dead 2,source,2.3.6,y,n,y,n,n,y -mc,mcserver,Minecraft,lwjgl2,null,y,n,n,n,n,n -mta,mtaserver,Multi Theft Auto,renderware,2.7,y,y,n,n,n,n -mumble,mumbleserver,Mumble,null,null,y,n,n,n,n,n -ns2,ns2server,Natural Selection 2,spark,2.17,n,y,y,y,n,y -nmrih,nmrihserver,No More Room in Hell,source,2.15,y,n,y,n,y,y -ns2c,ns2cserver,NS2: Combat,spark,2.15,y,n,y,n,n,y -opfor,opforserver,Opposing Force,goldsource,2.3.6,y,n,y,n,n,y -pvkii,pvkiiserver,Pirates Vikings & Knights II,source,2.3.6,y,n,y,n,n,y -pc,pcserver,Project Cars,madness,2.4,y,n,y,n,n,y -pz,pzserver,Project Zomboid,projectzomboid,2.15,y,n,y,n,n,n -q2,q2server,Quake 2,idtech2,null,y,n,n,n,n,n -q3,q3server,Quake 3: Arena,idtech3,2.1,y,n,n,n,n,y -ql,qlserver,Quake Live,idtech3_ql,2.15,y,y,y,n,n,y -qw,qwserver,Quake World,quake,2.14,y,n,n,n,n,n -ro,roserver,Red Orchestra: Ostfront 41-45,unreal2,2.4,y,n,y,n,n,y -ricochet,ricochetserver,Ricochet,goldsource,2.3.6,y,n,y,n,n,y -rust,rustserver,Rust,unity3d,2.15,y,n,y,n,n,y -samp,sampserver,San Andreas Multiplayer,renderware,2.3,y,n,n,n,n,n -ss3,ss3server,Serious Sam 3: BFE,seriousengine35,2.13,y,n,y,n,n,n -sb,sbserver,Starbound,starbound,2.17,y,n,y,y,n,y -st,stserver,Stationeers,unity3d,2.15,n,y,y,n,n,y -squad,squadserver,Squad,unreal4,2.17,y,n,y,n,n,n -sven,svenserver,Sven Co-op,goldsource,2.18,y,n,y,n,n,y -tf2,tf2server,Team Fortress 2,source,2.15,y,n,y,n,y,y -tfc,tfcserver,Team Fortress Classic,goldsource,2.3.6,y,n,y,n,n,y -ts3,ts3server,Teamspeak 3,null,null,y,n,n,n,n,n -tw,twserver,Teeworlds,teeworlds,2.14,y,n,y,y,n,n -terraria,terrariaserver,Terraria,terraria,2.7,y,n,y,y,n,n -tu,tuserver,Tower Unite,unreal4,2.14,y,n,y,n,y,n -ut2k4,ut2k4server,Unreal Tournament 2004,unreal2,2.4,y,n,n,n,n,y -ut3,ut3server,Unreal Tournament 3,unreal3,2.3.2,y,n,n,n,n,n -ut99,ut99server,Unreal Tournament 99,unreal,2.1,y,n,n,n,n,y -wet,wetserver,Wolfenstein: Enemy Territory,idtech3,2.2.4,y,n,n,n,n,y -zps,zpsserver,Zombie Panic! Source,source,2.15,y,n,y,n,n,y +shortname,servername,gamename,engine,glibc,x86,x64,steamcmd,steamlogin,appid,appidmod,gslt,query +ark,arkserver,ARK: Survival Evolved,unreal4,2.15,y,n,y,n,376030,null,n,n +arma3,arma3server,ARMA 3,realvirtuality,2.13,y,n,y,y,233780,null,n,y +bb2,bbserver,Brainbread,goldsource,2.3.2,y,n,y,n,90,cstrike,n,y +bb2,bb2server,BrainBread 2,source,2.17,y,n,y,n,475370,null,y,y +bd,bdserver,Base Defense,source,2.14,y,n,y,n,817300,null,n,y +bf1942,bf1942server,Battlefield 1942,refractor,2,y,n,n,n,null,null,n,y +bmdm,bmdmserver,Black Mesa: Deathmatch,source,2.15,y,n,y,n,346680,null,y,y +bo,boserver,Ballistic Overkill,unity3d,2.15,y,n,y,n,416881,null,y,y +bs,bsserver,Blade Symphony,source,2.15,y,n,y,y,228780,null,n,y +bt1944,bt1944server,Battalion 1944,unreal4,2.17,y,n,y,n,805140,null,n,y +cc,ccserver,Codename CURE,source,2.15,y,n,y,n,383410,null,n,y +cod,codserver,Call of Duty,idtech3,2.1,y,n,n,n,null,null,n,y +cod2,cod2server,Call of Duty 2,iw2.0,2.1.3,y,n,n,n,null,null,n,y +cod4,cod4server,Call of Duty 4,iw3.0,2.3,y,n,n,n,null,null,n,y +coduo,coduoserver,Call of Duty: United Offensive,idtech3,2.1,y,n,n,n,null,null,n,y +codwaw,codwawserver,Call of Duty: World at War,iw3.0,2.3.2,y,n,n,n,null,null,n,y +cs,csserver,Counter-Strike 1.6,goldsource,2.3.6,y,n,y,n,90,cstrike,n,y +cscz,csczserver,Counter-Strike: Condition Zero,goldsource,2.3.6,y,n,y,n,90,czero,n,y +csgo,csgoserver,Counter-Strike: Global Offensive,source,2.15,y,n,y,n,740,null,y,y +css,cssserver,Counter-Strike: Source,source,2.3.6,y,n,y,n,232330,null,y,y +dab,dabserver,Double Action: Boogaloo,source,2.15,y,n,y,n,317800,null,n,y +dmc,dmcserver,Deathmatch Classic,goldsource,2.3.6,y,n,y,n,90,dmc,n,y +dod,dodserver,Day of Defeat,goldsource,2.3.6,y,n,y,n,90,dod,n,y +dods,dodsserver,Day of Defeat: Source,source,2.3.6,y,n,y,n,232290,null,n,y +doi,doiserver,Day of Infamy,source,2.15,y,n,y,n,462310,null,n,y +dst,dstserver,Don't Starve Together,null,2.15,y,n,y,n,343050,null,n,n +eco,ecoserver,Eco,unity3d,null,y,n,y,y,739590,null,n,y +em,emserver,Empires Mod,source,2.15,y,n,y,n,460040,null,y,y +etl,etlserver,ET: Legacy,idtech3,2.7,y,n,n,n,null,null,n,y +fctr,fctrserver,Factorio,null,2.15,n,y,n,n,null,null,n,n +fof,fofserver,Fistful of Frags,source,2.15,y,n,y,n,295230,null,n,y +ges,gesserver,GoldenEye: Source,source,2.15,y,n,n,n,310,null,n,y +gmod,gmodserver,Garrys Mod,source,2.15,y,n,y,n,4020,null,y,y +hl2dm,hl2dmserver,Half-Life 2: Deathmatch,source,2.3.6,y,n,y,n,232370,null,n,y +hldm,hldmserver,Half-Life: Deathmatch,goldsource,2.3.6,y,n,y,n,90,null,n,y +hldms,hldmsserver,Half-Life Deathmatch: Source,source,2.3.6,y,n,y,n,255470,null,n,y +hw,hwserver,Hurtworld,unity3d,2.15,y,y,y,n,405100,null,n,y +ins,insserver,Insurgency,source,2.15,y,n,y,n,237410,null,y,y +inss,inssserver,Insurgency: Sandstorm,unreal4,2.17,y,n,y,n,581330,null,n,y +io,iosserver,IOSoccer,source,2.15,y,n,y,n,673990,null,n,y +jc2,jc2server,Just Cause 2,avalanche2.0,2.13,y,n,y,n,261140,null,n,y +jc3,jc3server,Just Cause 3,avalanche3.0,2.17,y,n,y,n,619960,null,n,y +kf,kfserver,Killing Floor,unreal2,2.4,y,n,y,y,215360,null,n,y +kf2,kf2server,Killing Floor 2,unreal3,2.17,n,y,y,n,232130,null,n,n +l4d,l4dserver,Left 4 Dead,source,2.3.6,y,n,y,n,222860,null,n,y +l4d2,l4d2server,Left 4 Dead 2,source,2.3.6,y,n,y,n,222860,null,n,y +mc,mcserver,Minecraft,null,null,y,n,n,n,null,null,n,n +mta,mtaserver,Multi Theft Auto,renderware,2.7,y,y,n,n,null,null,n,n +mumble,mumbleserver,Mumble,null,null,y,n,n,n,null,null,n,n +nmrih,nmrihserver,No More Room in Hell,source,2.15,y,n,y,n,317670,null,y,y +ns,nsserver,Natural Selection,goldsource,2.3.2,y,n,y,n,90,cstrike,n,y +ns2,ns2server,Natural Selection 2,spark,2.17,n,y,y,y,313900,null,n,y +ns2c,ns2cserver,NS2: Combat,spark,2.15,y,n,y,n,313900,null,n,y +opfor,opforserver,Opposing Force,goldsource,2.3.6,y,n,y,n,90,gearbox,n,y +pc,pcserver,Project Cars,madness,2.4,y,n,y,n,332670,null,n,y +pstbs,pstbsserverĀ ,Post Scriptum,unreal4,2.17,n,y,y,y,746200,null,n,y +pvkii,pvkiiserver,Pirates Vikings & Knights II,source,2.3.6,y,n,y,n,17575,null,n,y +pz,pzserver,Project Zomboid,null,2.15,y,n,y,n,380870,null,n,n +q2,q2server,Quake 2,idtech2,null,y,n,n,n,null,null,n,n +q3,q3server,Quake 3: Arena,idtech3,2.1,y,n,n,n,null,null,n,y +ql,qlserver,Quake Live,idtech3_ql,2.15,y,y,y,n,349090,null,n,y +qw,qwserver,Quake World,quake,2.14,y,n,n,n,null,null,n,n +ricochet,ricochetserver,Ricochet,goldsource,2.3.6,y,n,y,n,90,ricochet,n,y +ro,roserver,Red Orchestra: Ostfront 41-45,unreal2,2.4,y,n,y,n,223250,null,n,y +rtcw,rtcwserver,Return to Castle Wolfenstein,ioquake3,2.1,y,n,n,n,null,null,n,y +rust,rustserver,Rust,unity3d,2.15,y,n,y,n,258550,null,n,y +rw,rwserver,Rising World,null,2.14,n,y,y,n,339010,null,n,y +samp,sampserver,San Andreas Multiplayer,renderware,2.3,y,n,n,n,null,null,n,n +sb,sbserver,Starbound,null,2.17,y,n,y,y,211820,null,n,y +sbots,sbotsserver,StickyBots,unreal4,2.17,,,y,n,974130,null,n,y +sdtd,sdtdserver,7 Days to Die,unity3d,2.15,y,n,y,y,294420,null,n,y +squad,squadserver,Squad,unreal4,2.17,y,n,y,n,403240,null,n,n +ss3,ss3server,Serious Sam 3: BFE,seriousengine35,2.13,y,n,y,n,41080,null,n,n +st,stserver,Stationeers,unity3d,2.15,n,y,y,n,600760,null,n,y +sven,svenserver,Sven Co-op,goldsource,2.18,y,n,y,n,276060,null,n,y +terraria,terrariaserver,Terraria,null,2.7,y,n,y,y,105600,null,n,n +tf2,tf2server,Team Fortress 2,source,2.15,y,n,y,n,232250,null,y,y +tfc,tfcserver,Team Fortress Classic,goldsource,2.3.6,y,n,y,n,90,tfc,n,y +ts3,ts3server,Teamspeak 3,null,null,y,n,n,n,null,null,n,n +tu,tuserver,Tower Unite,unreal4,2.14,y,n,y,n,439660,null,y,n +tw,twserver,Teeworlds,null,2.14,y,n,y,y,380840,null,n,n +ut2k4,ut2k4server,Unreal Tournament 2004,unreal2,2.4,y,n,n,n,null,null,n,y +ut3,ut3server,Unreal Tournament 3,unreal3,2.3.2,y,n,n,n,null,null,n,n +ut99,ut99server,Unreal Tournament 99,unreal,2.1,y,n,n,n,null,null,n,y +vs,vsserver,Vampire Slayer,goldsource,2.3.2,y,n,y,n,90,cstrike,n,y +wet,wetserver,Wolfenstein: Enemy Territory,idtech3,2.2.4,y,n,n,n,null,null,n,y +wurm,wurmserver,Wurm: Unlimited,null,2.14,y,n,y,n,402370,null,n,y +zps,zpsserver,Zombie Panic! Source,source,2.15,y,n,y,n,17505,null,n,y From 6a64042996885f46c2d90dc0e7f830ba4b793ed6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 2 Mar 2019 20:51:45 +0000 Subject: [PATCH 14/18] tidy up comments --- lgsm/functions/command_stop.sh | 45 ++++++++++++++++------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index fc43476e6..c0f7ee3d7 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -9,13 +9,13 @@ local commandname="STOP" local commandaction="Stopping" local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# Attempts graceful shutdown by sending the 'CTRL+c'. +# Attempts graceful shutdown by sending 'CTRL+c'. fn_stop_graceful_ctrlc(){ fn_print_dots "Graceful: CTRL+c" fn_script_log_info "Graceful: CTRL+c" # sends quit tmux send-keys -t "${servicename}" C-c > /dev/null 2>&1 - # waits up to 30 seconds giving the server time to shutdown gracefuly + # 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 @@ -44,7 +44,7 @@ fn_stop_graceful_cmd(){ fn_script_log_info "Graceful: sending \"${1}\"" # sends specific stop command tmux send -t "${servicename}" "${1}" ENTER > /dev/null 2>&1 - # waits up to given seconds giving the server time to shutdown gracefully + # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. for ((seconds=1; seconds<=${2}; seconds++)); do check_status.sh if [ "${status}" == "0" ]; then @@ -65,16 +65,15 @@ fn_stop_graceful_cmd(){ sleep 0.5 } -# Attempts graceful of goldsource using rcon 'quit' command. -# Goldsource 'quit' command restarts rather than shutdown -# this function will only wait 3 seconds then force a tmux shutdown. -# preventing the server from coming back online. +# Attempts graceful shutdown of goldsource using rcon 'quit' command. +# There is only a 3 second delay before a forced a tmux shutdown +# as Goldsource servers 'quit' command does a restart rather than shutdown. fn_stop_graceful_goldsource(){ fn_print_dots "Graceful: sending \"quit\"" fn_script_log_info "Graceful: sending \"quit\"" # sends quit tmux send -t "${servicename}" quit ENTER > /dev/null 2>&1 - # waits 3 seconds as goldsource servers restart with the quit command + # Waits 3 seconds as goldsource servers restart with the quit command. for seconds in {1..3}; do sleep 1 fn_print_dots "Graceful: sending \"quit\": ${seconds}" @@ -85,7 +84,7 @@ fn_stop_graceful_goldsource(){ sleep 0.5 } -# Attempts graceful of 7 Days To Die using telnet. + fn_stop_telnet_sdtd(){ if [ -z "${telnetpass}" ]||[ "${telnetpass}" == "NOT SET" ]; then sdtd_telnet_shutdown=$( expect -c ' @@ -122,6 +121,7 @@ fn_stop_telnet_sdtd(){ fi } +# Attempts graceful shutdown of 7 Days To Die using telnet. fn_stop_graceful_sdtd(){ fn_print_dots "Graceful: telnet" fn_script_log_info "Graceful: telnet" @@ -147,8 +147,8 @@ fn_stop_graceful_sdtd(){ fi done - # If telnet was successful will use telnet again to check the connection has closed - # This confirms that the tmux session can now be killed. + # If telnet shutdown was successful will use telnet again to check + # the connection has closed, confirming that the tmux session can now be killed. if [ -n "${completed}" ]; then for seconds in {1..30}; do fn_stop_telnet_sdtd @@ -162,8 +162,7 @@ fn_stop_graceful_sdtd(){ sleep 1 fn_print_dots "Graceful: telnet: ${seconds}" done - # If telnet failed will go straight to tmux shutdown. - # If cannot shutdown correctly world save may be lost + # If telnet shutdown fails tmux shutdown will be used, this risks loss of world save. else if [ -n "${refused}" ]; then fn_print_error "Graceful: telnet: " @@ -196,7 +195,8 @@ fn_stop_graceful_select(){ elif [ "${shortname}" == "mc" ]; then fn_stop_graceful_cmd "stop" 30 elif [ "${shortname}" == "mta" ]; then - # we need a long wait time here as resources are stopped individually and process their own shutdowns + # long wait time required for mta + # as resources shutdown individually fn_stop_graceful_cmd "quit" 120 elif [ "${engine}" == "goldsource" ]; then fn_stop_graceful_goldsource @@ -208,7 +208,8 @@ fn_stop_graceful_select(){ } fn_stop_ark(){ - maxpiditer=15 # The maximum number of times to check if the ark pid has closed gracefully. + # The maximum number of times to check if the ark pid has closed gracefully. + maxpiditer=15 info_config.sh if [ -z "${queryport}" ]; then fn_print_warn "No queryport found using info_config.sh" @@ -226,8 +227,7 @@ fn_stop_ark(){ if [ "${#queryport}" -gt 0 ] ; then for (( pidcheck=0 ; pidcheck < ${maxpiditer} ; pidcheck++ )) ; do pid=$(netstat -nap 2>/dev/null | grep "^udp[[:space:]]" | grep ":${queryport}[[:space:]]" | rev | awk '{print $1}' | rev | cut -d\/ -f1) - # - # check for a valid pid + # Check for a valid pid. pid=${pid//[!0-9]/} let pid+=0 # turns an empty string into a valid number, '0', # and a valid numeric pid remains unchanged. @@ -235,7 +235,7 @@ fn_stop_ark(){ fn_print_dots "Process still bound. Awaiting graceful exit: ${pidcheck}" sleep 0.5 else - break # Our job is done here + break fi # end if for pid range check done if [[ ${pidcheck} -eq ${maxpiditer} ]] ; then @@ -253,7 +253,6 @@ fn_stop_teamspeak3(){ "${serverfiles}"/ts3server_startscript.sh stop > /dev/null 2>&1 check_status.sh if [ "${status}" == "0" ]; then - # Remove lockfile rm -f "${rootdir}/${lockselfname}" fn_print_ok_nl "${servername}" fn_script_log_pass "Stopped ${servername}" @@ -267,12 +266,11 @@ fn_stop_tmux(){ fn_print_dots "${servername}" fn_script_log_info "tmux kill-session: ${servername}" sleep 0.5 - # Kill tmux session tmux kill-session -t "${servicename}" > /dev/null 2>&1 sleep 0.5 check_status.sh if [ "${status}" == "0" ]; then - # ARK doesn't clean up immediately after tmux is killed. + # ARK does not clean up immediately after tmux is killed. # Make certain the ports are cleared before continuing. if [ "${shortname}" == "ark" ]; then fn_stop_ark @@ -285,10 +283,9 @@ fn_stop_tmux(){ fi } -# checks if the server is already stopped before trying to stop. +# Checks if the server is already stopped. fn_stop_pre_check(){ -# Is the server already stopped - if [ "${status}" == "0" ]; then # $status comes from check_status.sh, which is run by check.sh for this command + if [ "${status}" == "0" ]; then fn_print_info_nl "${servername} is already stopped" fn_script_log_error "${servername} is already stopped" elif [ "${shortname}" == "ts3" ]; then From 4fa0269c183fae51a90e7b298fd88e5b74b395af Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 2 Mar 2019 20:53:17 +0000 Subject: [PATCH 15/18] fix(stop): correct if statements --- lgsm/functions/command_stop.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index c0f7ee3d7..3f8782557 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -188,7 +188,7 @@ fn_stop_graceful_sdtd(){ fn_stop_graceful_select(){ if [ "${shortname}" == "sdtd" ]; then fn_stop_graceful_sdtd - elif [ "${engine}" == "Spark" ]; then + elif [ "${engine}" == "spark" ]; then fn_stop_graceful_cmd "q" 30 elif [ "${shortname}" == "terraria" ]; then fn_stop_graceful_cmd "exit" 30 @@ -202,7 +202,7 @@ fn_stop_graceful_select(){ fn_stop_graceful_goldsource elif [ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${shortname}" == "fctr" ]||[ "${shortname}" == "mumble" ]||[ "${shortname}" == "wurm" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "jc3" ]; then fn_stop_graceful_ctrlc - elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "pz" ]||[ "${shortname}" == "rw" ]; then + elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${shortname}" == "pz" ]||[ "${shortname}" == "rw" ]; then fn_stop_graceful_cmd "quit" 30 fi } From f4e7eb8ad7a340bf1ec6ab269ca05fb0fb47159b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 2 Mar 2019 21:00:48 +0000 Subject: [PATCH 16/18] comment tidy --- lgsm/functions/command_stop.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 3f8782557..77d0e0f60 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -13,7 +13,7 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_stop_graceful_ctrlc(){ fn_print_dots "Graceful: CTRL+c" fn_script_log_info "Graceful: CTRL+c" - # sends quit + # Sends quit. tmux send-keys -t "${servicename}" C-c > /dev/null 2>&1 # Waits up to 30 seconds giving the server time to shutdown gracefuly. for seconds in {1..30}; do @@ -38,11 +38,11 @@ fn_stop_graceful_ctrlc(){ # Attempts graceful shutdown by sending a specified command. # Usage: fn_stop_graceful_cmd "console_command" "timeout_in_seconds" -# e.g.: fn_stop_graceful_cmd "quit" "30" +# e.g.: fn_stop_graceful_cmd "quit" "30" fn_stop_graceful_cmd(){ fn_print_dots "Graceful: sending \"${1}\"" fn_script_log_info "Graceful: sending \"${1}\"" - # sends specific stop command + # Sends specific stop command. tmux send -t "${servicename}" "${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 @@ -236,7 +236,7 @@ fn_stop_ark(){ sleep 0.5 else break - fi # end if for pid range check + fi done if [[ ${pidcheck} -eq ${maxpiditer} ]] ; then # The process doesn't want to close after 20 seconds. @@ -244,8 +244,8 @@ fn_stop_ark(){ fn_print_error "Terminating reluctant Ark process: ${pid}" kill -9 ${pid} fi - fi # end if for port check -} # end of fn_stop_ark + fi +} fn_stop_teamspeak3(){ fn_print_dots "${servername}" @@ -293,7 +293,7 @@ fn_stop_pre_check(){ else fn_stop_graceful_select fi - # Check status again, a stop tmux session if needed + # Check status again, a stop tmux session if needed. check_status.sh if [ "${status}" != "0" ]; then fn_stop_tmux @@ -305,7 +305,7 @@ sleep 0.5 check.sh info_config.sh fn_stop_pre_check -# Remove lockfile +# Remove lockfile. if [ -f "${rootdir}/${lockselfname}" ]; then rm -f "${rootdir}/${lockselfname}" fi From 85731e1510c32fea4c5a5fd227bbdf8128a07c2c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 2 Mar 2019 22:22:03 +0000 Subject: [PATCH 17/18] feat(serverlist): add compatibility for updated serverlist.csv --- linuxgsm.sh | 58 +++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 126bccf88..6ffc9caa4 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -37,6 +37,7 @@ libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" datadir="${lgsmdir}/data" serverlist="${datadir}/serverlist.csv" +serverlistmenu="${datadir}/serverlistmenu.csv" configdir="${lgsmdir}/config-lgsm" configdirserver="${configdir}/${gameservername}" configdirdefault="${lgsmdir}/config-default" @@ -49,16 +50,16 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Core Function that is required first +# Core function that is required first. core_functions.sh(){ functionfile="${FUNCNAME}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } # Bootstrap -# Fetches the core functions required before passed off to core_dl.sh +# Fetches the core functions required before passed off to core_dl.sh. -# Fetches core functions +# Fetches core functions. fn_bootstrap_fetch_file(){ remote_fileurl="${1}" local_filedir="${2}" @@ -67,17 +68,17 @@ fn_bootstrap_fetch_file(){ run="${5:-0}" forcedl="${6:-0}" md5="${7:-0}" - # download file if missing or download forced + # 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 - # Defines curl path + # Defines curl path. curlpath=$(command -v curl 2>/dev/null) - # If curl exists download file + # If curl exists download file. if [ "$(basename "${curlpath}")" == "curl" ]; then - # trap to remove part downloaded files + # Trap to remove part downloaded files. echo -en " fetching ${local_filename}...\c" curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) local exitcode=$? @@ -95,14 +96,14 @@ fn_bootstrap_fetch_file(){ echo "[ FAIL ] Curl is not installed" exit 1 fi - # make file chmodx if chmodx is set + # Make file chmodx if chmodx is set. if [ "${chmodx}" == "chmodx" ]; then chmod +x "${local_filedir}/${local_filename}" fi fi if [ -f "${local_filedir}/${local_filename}" ]; then - # run file if run is set + # Run file if run is set. if [ "${run}" == "run" ]; then source "${local_filedir}/${local_filename}" fi @@ -121,11 +122,11 @@ fn_bootstrap_fetch_file_github(){ run="${5:-0}" forcedl="${6:-0}" md5="${7:-0}" - # Passes vars to the file download function + # Passes vars to the file download function. fn_bootstrap_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } -# Installer menu +# Installer menu. fn_print_center() { columns="$(tput cols)" @@ -138,7 +139,7 @@ fn_print_horizontal(){ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}" } -# Bash Menu +# Bash menu. fn_install_menu_bash() { local resultvar=$1 title=$2 @@ -162,7 +163,7 @@ fn_install_menu_bash() { done } -# Whiptail/Dialog Menu +# Whiptail/Dialog menu. fn_install_menu_whiptail() { local menucmd=$1 local resultvar=$2 @@ -187,14 +188,14 @@ fn_install_menu_whiptail() { fi } -# Menu selector +# Menu selector. fn_install_menu() { local resultvar=$1 local selection="" title=$2 caption=$3 options=$4 - # Get menu command + # Get menu command. for menucmd in whiptail dialog bash; do if [ -x "$(command -v "${menucmd}")" ]; then menucmd=$(command -v "${menucmd}") @@ -210,7 +211,7 @@ fn_install_menu() { eval "$resultvar=\"${selection}\"" } -# Gets server info from serverlist.csv and puts in to array +# Gets server info from serverlist.csv and puts in to array. fn_server_info(){ IFS="," server_info_array=($(grep -aw "${userinput}" "${serverlist}")) @@ -228,7 +229,7 @@ fn_install_getopt(){ echo -e "" echo -e "Commands" echo -e "install\t\t| Select server to install." - echo -e "servername\t| e.g $0 csgoserver. Enter name of server/game to install." + echo -e "servername\t| Enter name of game server to install. e.g $0 csgoserver." echo -e "list\t\t| List all servers available for install." exit } @@ -273,7 +274,7 @@ if [ "$(whoami)" == "root" ]; then fi fi -# LinuxGSM installer mode +# LinuxGSM installer mode. if [ "${shortname}" == "core" ]; then # Download the latest serverlist. This is the complete list of all supported servers. fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" @@ -282,13 +283,14 @@ if [ "${shortname}" == "core" ]; then exit 1 fi - if [ "${userinput}" == "list" ]; then + if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then { - tail -n +2 "${serverlist}"|awk -F "," '{print $2 "\t" $3}' + tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then - fn_install_menu result "LinuxGSM" "Select game to install" "${serverlist}" + tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" + fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" fn_server_info if [ "${result}" == "${gameservername}" ]; then @@ -311,11 +313,11 @@ if [ "${shortname}" == "core" ]; then fn_install_getopt fi -# LinuxGSM Server Mode +# LinuxGSM server mode. else core_functions.sh if [ "${shortname}" != "core-dep" ]; then - # Load LinuxGSM configs + # Load LinuxGSM configs. # These are required to get all the default variables for the specific server. # Load the default config. If missing download it. If changed reload it. if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then @@ -349,14 +351,14 @@ else fi fi source "${configdirserver}/_default.cfg" - # Load the common.cfg config. If missing download it + # Load the common.cfg config. If missing download it. if [ ! -f "${configdirserver}/common.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" source "${configdirserver}/common.cfg" else source "${configdirserver}/common.cfg" fi - # Load the instance.cfg config. If missing download it + # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${servicename}.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" source "${configdirserver}/${servicename}.cfg" @@ -364,14 +366,14 @@ else source "${configdirserver}/${servicename}.cfg" fi - # Load the linuxgsm.sh in to tmpdir. If missing download it + # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fi fi - # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off + # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. fn_ansi_loader - # Prevents running of core_exit.sh for Travis. + # Prevents running of core_exit.sh for Travis-CI. if [ "${travistest}" != "1" ]; then getopt=$1 core_getopt.sh From 88e463d27b7cf56973c723c09f46961f72dc55e8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 2 Mar 2019 22:29:08 +0000 Subject: [PATCH 18/18] feat(servelist): add new data to serverlist.csv New data added to serverlist.csv. In future will be start to become easier to add servers as info can be added in to serverlist instead. This change will happen over time fix(stop): correct if statements feat(serverlist): add compatibility for updated serverlist.csv --- lgsm/data/serverlist.csv | 164 ++++++++++++++++++--------------- lgsm/functions/command_stop.sh | 65 +++++++------ linuxgsm.sh | 58 ++++++------ 3 files changed, 150 insertions(+), 137 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 3204c89ce..725b483d4 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -1,75 +1,89 @@ -shortname,servername,gamename,engine,glibc,x86,x64,steamcmd,steamlogin,gslt,query -arma3,arma3server,ARMA 3,realvirtuality,2.13,y,n,y,y,n,y -sdtd,sdtdserver,7 Days to Die,unity3d,2.15,y,n,y,y,n,y -ark,arkserver,ARK: Survival Evolved,unreal4,2.15,y,n,y,n,n,n -bo,boserver,Ballistic Overkill,unity3d,2.15,y,n,y,n,y,y -bf1942,bf1942server,Battlefield 1942,refractor,2,y,n,n,n,n,y -bmdm,bmdmserver,Black Mesa: Deathmatch,source,2.15,y,n,y,n,y,y -bs,bsserver,Blade Symphony,source,2.15,y,n,y,y,n,y -bb2,bb2server,BrainBread 2,source,2.17,y,n,y,n,y,y -cod,codserver,Call of Duty,idtech3,2.1,y,n,n,n,n,y -cod2,cod2server,Call of Duty 2,iw2.0,2.1.3,y,n,n,n,n,y -cod4,cod4server,Call of Duty 4,iw3.0,2.3,y,n,n,n,n,y -coduo,coduoserver,Call of Duty: United Offensive,idtech3,2.1,y,n,n,n,n,y -codwaw,codwawserver,Call of Duty: World at War,iw3.0,2.3.2,y,n,n,n,n,y -cc,ccserver,Codename CURE,source,2.15,y,n,y,n,n,y -cs,csserver,Counter-Strike 1.6,goldsource,2.3.6,y,n,y,n,n,y -cscz,csczserver,Counter-Strike: Condition Zero,goldsource,2.3.6,y,n,y,n,n,y -csgo,csgoserver,Counter-Strike: Global Offensive,source,2.15,y,n,y,n,y,y -css,cssserver,Counter-Strike: Source,source,2.3.6,y,n,y,n,y,y -dod,dodserver,Day of Defeat,goldsource,2.3.6,y,n,y,n,n,y -dods,dodsserver,Day of Defeat: Source,source,2.3.6,y,n,y,n,n,y -doi,doiserver,Day of Infamy,source,2.15,y,n,y,n,n,y -dmc,dmcserver,Deathmatch Classic,goldsource,2.3.6,y,n,y,n,n,y -dst,dstserver,Don't Starve Together,dontstarve,2.15,y,n,y,n,n,n -dab,dabserver,Double Action: Boogaloo,source,2.15,y,n,y,n,n,y -em,emserver,Empires Mod,source,2.15,y,n,y,n,y,y -fctr,fctrserver,Factorio,factorio,2.15,n,y,n,n,n,n -fof,fofserver,Fistful of Frags,source,2.15,y,n,y,n,n,y -gmod,gmodserver,Garrys Mod,source,2.15,y,n,y,n,y,y -ges,gesserver,GoldenEye: Source,source,2.15,y,n,n,n,n,y -hl2dm,hl2dmserver,Half-Life 2: Deathmatch,source,2.3.6,y,n,y,n,n,y -hldms,hldmsserver,Half-Life Deathmatch: Source,source,2.3.6,y,n,y,n,n,y -hldm,hldmserver,Half-Life: Deathmatch,goldsource,2.3.6,y,n,y,n,n,y -hw,hwserver,Hurtworld,unity3d,2.15,y,y,y,n,n,y -ins,insserver,Insurgency,source,2.15,y,n,y,n,y,y -jc2,jc2server,Just Cause 2,avalanche2.0,2.13,y,n,y,n,n,y -jc3,jc3server,Just Cause 3,avalanche3.0,2.17,y,n,y,n,n,y -kf,kfserver,Killing Floor,unreal2,2.4,y,n,y,y,n,y -kf2,kf2server,Killing Floor 2,unreal3,2.17,n,y,y,n,n,n -l4d,l4dserver,Left 4 Dead,source,2.3.6,y,n,y,n,n,y -l4d2,l4d2server,Left 4 Dead 2,source,2.3.6,y,n,y,n,n,y -mc,mcserver,Minecraft,lwjgl2,null,y,n,n,n,n,n -mta,mtaserver,Multi Theft Auto,renderware,2.7,y,y,n,n,n,n -mumble,mumbleserver,Mumble,null,null,y,n,n,n,n,n -ns2,ns2server,Natural Selection 2,spark,2.17,n,y,y,y,n,y -nmrih,nmrihserver,No More Room in Hell,source,2.15,y,n,y,n,y,y -ns2c,ns2cserver,NS2: Combat,spark,2.15,y,n,y,n,n,y -opfor,opforserver,Opposing Force,goldsource,2.3.6,y,n,y,n,n,y -pvkii,pvkiiserver,Pirates Vikings & Knights II,source,2.3.6,y,n,y,n,n,y -pc,pcserver,Project Cars,madness,2.4,y,n,y,n,n,y -pz,pzserver,Project Zomboid,projectzomboid,2.15,y,n,y,n,n,n -q2,q2server,Quake 2,idtech2,null,y,n,n,n,n,n -q3,q3server,Quake 3: Arena,idtech3,2.1,y,n,n,n,n,y -ql,qlserver,Quake Live,idtech3_ql,2.15,y,y,y,n,n,y -qw,qwserver,Quake World,quake,2.14,y,n,n,n,n,n -ro,roserver,Red Orchestra: Ostfront 41-45,unreal2,2.4,y,n,y,n,n,y -ricochet,ricochetserver,Ricochet,goldsource,2.3.6,y,n,y,n,n,y -rust,rustserver,Rust,unity3d,2.15,y,n,y,n,n,y -samp,sampserver,San Andreas Multiplayer,renderware,2.3,y,n,n,n,n,n -ss3,ss3server,Serious Sam 3: BFE,seriousengine35,2.13,y,n,y,n,n,n -sb,sbserver,Starbound,starbound,2.17,y,n,y,y,n,y -st,stserver,Stationeers,unity3d,2.15,n,y,y,n,n,y -squad,squadserver,Squad,unreal4,2.17,y,n,y,n,n,n -sven,svenserver,Sven Co-op,goldsource,2.18,y,n,y,n,n,y -tf2,tf2server,Team Fortress 2,source,2.15,y,n,y,n,y,y -tfc,tfcserver,Team Fortress Classic,goldsource,2.3.6,y,n,y,n,n,y -ts3,ts3server,Teamspeak 3,null,null,y,n,n,n,n,n -tw,twserver,Teeworlds,teeworlds,2.14,y,n,y,y,n,n -terraria,terrariaserver,Terraria,terraria,2.7,y,n,y,y,n,n -tu,tuserver,Tower Unite,unreal4,2.14,y,n,y,n,y,n -ut2k4,ut2k4server,Unreal Tournament 2004,unreal2,2.4,y,n,n,n,n,y -ut3,ut3server,Unreal Tournament 3,unreal3,2.3.2,y,n,n,n,n,n -ut99,ut99server,Unreal Tournament 99,unreal,2.1,y,n,n,n,n,y -wet,wetserver,Wolfenstein: Enemy Territory,idtech3,2.2.4,y,n,n,n,n,y -zps,zpsserver,Zombie Panic! Source,source,2.15,y,n,y,n,n,y +shortname,servername,gamename,engine,glibc,x86,x64,steamcmd,steamlogin,appid,appidmod,gslt,query +ark,arkserver,ARK: Survival Evolved,unreal4,2.15,y,n,y,n,376030,null,n,n +arma3,arma3server,ARMA 3,realvirtuality,2.13,y,n,y,y,233780,null,n,y +bb2,bbserver,Brainbread,goldsource,2.3.2,y,n,y,n,90,cstrike,n,y +bb2,bb2server,BrainBread 2,source,2.17,y,n,y,n,475370,null,y,y +bd,bdserver,Base Defense,source,2.14,y,n,y,n,817300,null,n,y +bf1942,bf1942server,Battlefield 1942,refractor,2,y,n,n,n,null,null,n,y +bmdm,bmdmserver,Black Mesa: Deathmatch,source,2.15,y,n,y,n,346680,null,y,y +bo,boserver,Ballistic Overkill,unity3d,2.15,y,n,y,n,416881,null,y,y +bs,bsserver,Blade Symphony,source,2.15,y,n,y,y,228780,null,n,y +bt1944,bt1944server,Battalion 1944,unreal4,2.17,y,n,y,n,805140,null,n,y +cc,ccserver,Codename CURE,source,2.15,y,n,y,n,383410,null,n,y +cod,codserver,Call of Duty,idtech3,2.1,y,n,n,n,null,null,n,y +cod2,cod2server,Call of Duty 2,iw2.0,2.1.3,y,n,n,n,null,null,n,y +cod4,cod4server,Call of Duty 4,iw3.0,2.3,y,n,n,n,null,null,n,y +coduo,coduoserver,Call of Duty: United Offensive,idtech3,2.1,y,n,n,n,null,null,n,y +codwaw,codwawserver,Call of Duty: World at War,iw3.0,2.3.2,y,n,n,n,null,null,n,y +cs,csserver,Counter-Strike 1.6,goldsource,2.3.6,y,n,y,n,90,cstrike,n,y +cscz,csczserver,Counter-Strike: Condition Zero,goldsource,2.3.6,y,n,y,n,90,czero,n,y +csgo,csgoserver,Counter-Strike: Global Offensive,source,2.15,y,n,y,n,740,null,y,y +css,cssserver,Counter-Strike: Source,source,2.3.6,y,n,y,n,232330,null,y,y +dab,dabserver,Double Action: Boogaloo,source,2.15,y,n,y,n,317800,null,n,y +dmc,dmcserver,Deathmatch Classic,goldsource,2.3.6,y,n,y,n,90,dmc,n,y +dod,dodserver,Day of Defeat,goldsource,2.3.6,y,n,y,n,90,dod,n,y +dods,dodsserver,Day of Defeat: Source,source,2.3.6,y,n,y,n,232290,null,n,y +doi,doiserver,Day of Infamy,source,2.15,y,n,y,n,462310,null,n,y +dst,dstserver,Don't Starve Together,null,2.15,y,n,y,n,343050,null,n,n +eco,ecoserver,Eco,unity3d,null,y,n,y,y,739590,null,n,y +em,emserver,Empires Mod,source,2.15,y,n,y,n,460040,null,y,y +etl,etlserver,ET: Legacy,idtech3,2.7,y,n,n,n,null,null,n,y +fctr,fctrserver,Factorio,null,2.15,n,y,n,n,null,null,n,n +fof,fofserver,Fistful of Frags,source,2.15,y,n,y,n,295230,null,n,y +ges,gesserver,GoldenEye: Source,source,2.15,y,n,n,n,310,null,n,y +gmod,gmodserver,Garrys Mod,source,2.15,y,n,y,n,4020,null,y,y +hl2dm,hl2dmserver,Half-Life 2: Deathmatch,source,2.3.6,y,n,y,n,232370,null,n,y +hldm,hldmserver,Half-Life: Deathmatch,goldsource,2.3.6,y,n,y,n,90,null,n,y +hldms,hldmsserver,Half-Life Deathmatch: Source,source,2.3.6,y,n,y,n,255470,null,n,y +hw,hwserver,Hurtworld,unity3d,2.15,y,y,y,n,405100,null,n,y +ins,insserver,Insurgency,source,2.15,y,n,y,n,237410,null,y,y +inss,inssserver,Insurgency: Sandstorm,unreal4,2.17,y,n,y,n,581330,null,n,y +io,iosserver,IOSoccer,source,2.15,y,n,y,n,673990,null,n,y +jc2,jc2server,Just Cause 2,avalanche2.0,2.13,y,n,y,n,261140,null,n,y +jc3,jc3server,Just Cause 3,avalanche3.0,2.17,y,n,y,n,619960,null,n,y +kf,kfserver,Killing Floor,unreal2,2.4,y,n,y,y,215360,null,n,y +kf2,kf2server,Killing Floor 2,unreal3,2.17,n,y,y,n,232130,null,n,n +l4d,l4dserver,Left 4 Dead,source,2.3.6,y,n,y,n,222860,null,n,y +l4d2,l4d2server,Left 4 Dead 2,source,2.3.6,y,n,y,n,222860,null,n,y +mc,mcserver,Minecraft,null,null,y,n,n,n,null,null,n,n +mta,mtaserver,Multi Theft Auto,renderware,2.7,y,y,n,n,null,null,n,n +mumble,mumbleserver,Mumble,null,null,y,n,n,n,null,null,n,n +nmrih,nmrihserver,No More Room in Hell,source,2.15,y,n,y,n,317670,null,y,y +ns,nsserver,Natural Selection,goldsource,2.3.2,y,n,y,n,90,cstrike,n,y +ns2,ns2server,Natural Selection 2,spark,2.17,n,y,y,y,313900,null,n,y +ns2c,ns2cserver,NS2: Combat,spark,2.15,y,n,y,n,313900,null,n,y +opfor,opforserver,Opposing Force,goldsource,2.3.6,y,n,y,n,90,gearbox,n,y +pc,pcserver,Project Cars,madness,2.4,y,n,y,n,332670,null,n,y +pstbs,pstbsserverĀ ,Post Scriptum,unreal4,2.17,n,y,y,y,746200,null,n,y +pvkii,pvkiiserver,Pirates Vikings & Knights II,source,2.3.6,y,n,y,n,17575,null,n,y +pz,pzserver,Project Zomboid,null,2.15,y,n,y,n,380870,null,n,n +q2,q2server,Quake 2,idtech2,null,y,n,n,n,null,null,n,n +q3,q3server,Quake 3: Arena,idtech3,2.1,y,n,n,n,null,null,n,y +ql,qlserver,Quake Live,idtech3_ql,2.15,y,y,y,n,349090,null,n,y +qw,qwserver,Quake World,quake,2.14,y,n,n,n,null,null,n,n +ricochet,ricochetserver,Ricochet,goldsource,2.3.6,y,n,y,n,90,ricochet,n,y +ro,roserver,Red Orchestra: Ostfront 41-45,unreal2,2.4,y,n,y,n,223250,null,n,y +rtcw,rtcwserver,Return to Castle Wolfenstein,ioquake3,2.1,y,n,n,n,null,null,n,y +rust,rustserver,Rust,unity3d,2.15,y,n,y,n,258550,null,n,y +rw,rwserver,Rising World,null,2.14,n,y,y,n,339010,null,n,y +samp,sampserver,San Andreas Multiplayer,renderware,2.3,y,n,n,n,null,null,n,n +sb,sbserver,Starbound,null,2.17,y,n,y,y,211820,null,n,y +sbots,sbotsserver,StickyBots,unreal4,2.17,,,y,n,974130,null,n,y +sdtd,sdtdserver,7 Days to Die,unity3d,2.15,y,n,y,y,294420,null,n,y +squad,squadserver,Squad,unreal4,2.17,y,n,y,n,403240,null,n,n +ss3,ss3server,Serious Sam 3: BFE,seriousengine35,2.13,y,n,y,n,41080,null,n,n +st,stserver,Stationeers,unity3d,2.15,n,y,y,n,600760,null,n,y +sven,svenserver,Sven Co-op,goldsource,2.18,y,n,y,n,276060,null,n,y +terraria,terrariaserver,Terraria,null,2.7,y,n,y,y,105600,null,n,n +tf2,tf2server,Team Fortress 2,source,2.15,y,n,y,n,232250,null,y,y +tfc,tfcserver,Team Fortress Classic,goldsource,2.3.6,y,n,y,n,90,tfc,n,y +ts3,ts3server,Teamspeak 3,null,null,y,n,n,n,null,null,n,n +tu,tuserver,Tower Unite,unreal4,2.14,y,n,y,n,439660,null,y,n +tw,twserver,Teeworlds,null,2.14,y,n,y,y,380840,null,n,n +ut2k4,ut2k4server,Unreal Tournament 2004,unreal2,2.4,y,n,n,n,null,null,n,y +ut3,ut3server,Unreal Tournament 3,unreal3,2.3.2,y,n,n,n,null,null,n,n +ut99,ut99server,Unreal Tournament 99,unreal,2.1,y,n,n,n,null,null,n,y +vs,vsserver,Vampire Slayer,goldsource,2.3.2,y,n,y,n,90,cstrike,n,y +wet,wetserver,Wolfenstein: Enemy Territory,idtech3,2.2.4,y,n,n,n,null,null,n,y +wurm,wurmserver,Wurm: Unlimited,null,2.14,y,n,y,n,402370,null,n,y +zps,zpsserver,Zombie Panic! Source,source,2.15,y,n,y,n,17505,null,n,y diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index fc43476e6..77d0e0f60 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -9,13 +9,13 @@ local commandname="STOP" local commandaction="Stopping" local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# Attempts graceful shutdown by sending the 'CTRL+c'. +# Attempts graceful shutdown by sending 'CTRL+c'. fn_stop_graceful_ctrlc(){ fn_print_dots "Graceful: CTRL+c" fn_script_log_info "Graceful: CTRL+c" - # sends quit + # Sends quit. tmux send-keys -t "${servicename}" C-c > /dev/null 2>&1 - # waits up to 30 seconds giving the server time to shutdown gracefuly + # 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 @@ -38,13 +38,13 @@ fn_stop_graceful_ctrlc(){ # Attempts graceful shutdown by sending a specified command. # Usage: fn_stop_graceful_cmd "console_command" "timeout_in_seconds" -# e.g.: fn_stop_graceful_cmd "quit" "30" +# e.g.: fn_stop_graceful_cmd "quit" "30" fn_stop_graceful_cmd(){ fn_print_dots "Graceful: sending \"${1}\"" fn_script_log_info "Graceful: sending \"${1}\"" - # sends specific stop command + # Sends specific stop command. tmux send -t "${servicename}" "${1}" ENTER > /dev/null 2>&1 - # waits up to given seconds giving the server time to shutdown gracefully + # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. for ((seconds=1; seconds<=${2}; seconds++)); do check_status.sh if [ "${status}" == "0" ]; then @@ -65,16 +65,15 @@ fn_stop_graceful_cmd(){ sleep 0.5 } -# Attempts graceful of goldsource using rcon 'quit' command. -# Goldsource 'quit' command restarts rather than shutdown -# this function will only wait 3 seconds then force a tmux shutdown. -# preventing the server from coming back online. +# Attempts graceful shutdown of goldsource using rcon 'quit' command. +# There is only a 3 second delay before a forced a tmux shutdown +# as Goldsource servers 'quit' command does a restart rather than shutdown. fn_stop_graceful_goldsource(){ fn_print_dots "Graceful: sending \"quit\"" fn_script_log_info "Graceful: sending \"quit\"" # sends quit tmux send -t "${servicename}" quit ENTER > /dev/null 2>&1 - # waits 3 seconds as goldsource servers restart with the quit command + # Waits 3 seconds as goldsource servers restart with the quit command. for seconds in {1..3}; do sleep 1 fn_print_dots "Graceful: sending \"quit\": ${seconds}" @@ -85,7 +84,7 @@ fn_stop_graceful_goldsource(){ sleep 0.5 } -# Attempts graceful of 7 Days To Die using telnet. + fn_stop_telnet_sdtd(){ if [ -z "${telnetpass}" ]||[ "${telnetpass}" == "NOT SET" ]; then sdtd_telnet_shutdown=$( expect -c ' @@ -122,6 +121,7 @@ fn_stop_telnet_sdtd(){ fi } +# Attempts graceful shutdown of 7 Days To Die using telnet. fn_stop_graceful_sdtd(){ fn_print_dots "Graceful: telnet" fn_script_log_info "Graceful: telnet" @@ -147,8 +147,8 @@ fn_stop_graceful_sdtd(){ fi done - # If telnet was successful will use telnet again to check the connection has closed - # This confirms that the tmux session can now be killed. + # If telnet shutdown was successful will use telnet again to check + # the connection has closed, confirming that the tmux session can now be killed. if [ -n "${completed}" ]; then for seconds in {1..30}; do fn_stop_telnet_sdtd @@ -162,8 +162,7 @@ fn_stop_graceful_sdtd(){ sleep 1 fn_print_dots "Graceful: telnet: ${seconds}" done - # If telnet failed will go straight to tmux shutdown. - # If cannot shutdown correctly world save may be lost + # If telnet shutdown fails tmux shutdown will be used, this risks loss of world save. else if [ -n "${refused}" ]; then fn_print_error "Graceful: telnet: " @@ -189,26 +188,28 @@ fn_stop_graceful_sdtd(){ fn_stop_graceful_select(){ if [ "${shortname}" == "sdtd" ]; then fn_stop_graceful_sdtd - elif [ "${engine}" == "Spark" ]; then + elif [ "${engine}" == "spark" ]; then fn_stop_graceful_cmd "q" 30 elif [ "${shortname}" == "terraria" ]; then fn_stop_graceful_cmd "exit" 30 elif [ "${shortname}" == "mc" ]; then fn_stop_graceful_cmd "stop" 30 elif [ "${shortname}" == "mta" ]; then - # we need a long wait time here as resources are stopped individually and process their own shutdowns + # long wait time required for mta + # as resources shutdown individually fn_stop_graceful_cmd "quit" 120 elif [ "${engine}" == "goldsource" ]; then fn_stop_graceful_goldsource elif [ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${shortname}" == "fctr" ]||[ "${shortname}" == "mumble" ]||[ "${shortname}" == "wurm" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "jc3" ]; then fn_stop_graceful_ctrlc - elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "pz" ]||[ "${shortname}" == "rw" ]; then + elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${shortname}" == "pz" ]||[ "${shortname}" == "rw" ]; then fn_stop_graceful_cmd "quit" 30 fi } fn_stop_ark(){ - maxpiditer=15 # The maximum number of times to check if the ark pid has closed gracefully. + # The maximum number of times to check if the ark pid has closed gracefully. + maxpiditer=15 info_config.sh if [ -z "${queryport}" ]; then fn_print_warn "No queryport found using info_config.sh" @@ -226,8 +227,7 @@ fn_stop_ark(){ if [ "${#queryport}" -gt 0 ] ; then for (( pidcheck=0 ; pidcheck < ${maxpiditer} ; pidcheck++ )) ; do pid=$(netstat -nap 2>/dev/null | grep "^udp[[:space:]]" | grep ":${queryport}[[:space:]]" | rev | awk '{print $1}' | rev | cut -d\/ -f1) - # - # check for a valid pid + # Check for a valid pid. pid=${pid//[!0-9]/} let pid+=0 # turns an empty string into a valid number, '0', # and a valid numeric pid remains unchanged. @@ -235,8 +235,8 @@ fn_stop_ark(){ fn_print_dots "Process still bound. Awaiting graceful exit: ${pidcheck}" sleep 0.5 else - break # Our job is done here - fi # end if for pid range check + break + fi done if [[ ${pidcheck} -eq ${maxpiditer} ]] ; then # The process doesn't want to close after 20 seconds. @@ -244,8 +244,8 @@ fn_stop_ark(){ fn_print_error "Terminating reluctant Ark process: ${pid}" kill -9 ${pid} fi - fi # end if for port check -} # end of fn_stop_ark + fi +} fn_stop_teamspeak3(){ fn_print_dots "${servername}" @@ -253,7 +253,6 @@ fn_stop_teamspeak3(){ "${serverfiles}"/ts3server_startscript.sh stop > /dev/null 2>&1 check_status.sh if [ "${status}" == "0" ]; then - # Remove lockfile rm -f "${rootdir}/${lockselfname}" fn_print_ok_nl "${servername}" fn_script_log_pass "Stopped ${servername}" @@ -267,12 +266,11 @@ fn_stop_tmux(){ fn_print_dots "${servername}" fn_script_log_info "tmux kill-session: ${servername}" sleep 0.5 - # Kill tmux session tmux kill-session -t "${servicename}" > /dev/null 2>&1 sleep 0.5 check_status.sh if [ "${status}" == "0" ]; then - # ARK doesn't clean up immediately after tmux is killed. + # ARK does not clean up immediately after tmux is killed. # Make certain the ports are cleared before continuing. if [ "${shortname}" == "ark" ]; then fn_stop_ark @@ -285,10 +283,9 @@ fn_stop_tmux(){ fi } -# checks if the server is already stopped before trying to stop. +# Checks if the server is already stopped. fn_stop_pre_check(){ -# Is the server already stopped - if [ "${status}" == "0" ]; then # $status comes from check_status.sh, which is run by check.sh for this command + if [ "${status}" == "0" ]; then fn_print_info_nl "${servername} is already stopped" fn_script_log_error "${servername} is already stopped" elif [ "${shortname}" == "ts3" ]; then @@ -296,7 +293,7 @@ fn_stop_pre_check(){ else fn_stop_graceful_select fi - # Check status again, a stop tmux session if needed + # Check status again, a stop tmux session if needed. check_status.sh if [ "${status}" != "0" ]; then fn_stop_tmux @@ -308,7 +305,7 @@ sleep 0.5 check.sh info_config.sh fn_stop_pre_check -# Remove lockfile +# Remove lockfile. if [ -f "${rootdir}/${lockselfname}" ]; then rm -f "${rootdir}/${lockselfname}" fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 126bccf88..6ffc9caa4 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -37,6 +37,7 @@ libdir="${lgsmdir}/lib" tmpdir="${lgsmdir}/tmp" datadir="${lgsmdir}/data" serverlist="${datadir}/serverlist.csv" +serverlistmenu="${datadir}/serverlistmenu.csv" configdir="${lgsmdir}/config-lgsm" configdirserver="${configdir}/${gameservername}" configdirdefault="${lgsmdir}/config-default" @@ -49,16 +50,16 @@ githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" -# Core Function that is required first +# Core function that is required first. core_functions.sh(){ functionfile="${FUNCNAME}" fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } # Bootstrap -# Fetches the core functions required before passed off to core_dl.sh +# Fetches the core functions required before passed off to core_dl.sh. -# Fetches core functions +# Fetches core functions. fn_bootstrap_fetch_file(){ remote_fileurl="${1}" local_filedir="${2}" @@ -67,17 +68,17 @@ fn_bootstrap_fetch_file(){ run="${5:-0}" forcedl="${6:-0}" md5="${7:-0}" - # download file if missing or download forced + # 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 - # Defines curl path + # Defines curl path. curlpath=$(command -v curl 2>/dev/null) - # If curl exists download file + # If curl exists download file. if [ "$(basename "${curlpath}")" == "curl" ]; then - # trap to remove part downloaded files + # Trap to remove part downloaded files. echo -en " fetching ${local_filename}...\c" curlcmd=$(${curlpath} -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1) local exitcode=$? @@ -95,14 +96,14 @@ fn_bootstrap_fetch_file(){ echo "[ FAIL ] Curl is not installed" exit 1 fi - # make file chmodx if chmodx is set + # Make file chmodx if chmodx is set. if [ "${chmodx}" == "chmodx" ]; then chmod +x "${local_filedir}/${local_filename}" fi fi if [ -f "${local_filedir}/${local_filename}" ]; then - # run file if run is set + # Run file if run is set. if [ "${run}" == "run" ]; then source "${local_filedir}/${local_filename}" fi @@ -121,11 +122,11 @@ fn_bootstrap_fetch_file_github(){ run="${5:-0}" forcedl="${6:-0}" md5="${7:-0}" - # Passes vars to the file download function + # Passes vars to the file download function. fn_bootstrap_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } -# Installer menu +# Installer menu. fn_print_center() { columns="$(tput cols)" @@ -138,7 +139,7 @@ fn_print_horizontal(){ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' "${char}" } -# Bash Menu +# Bash menu. fn_install_menu_bash() { local resultvar=$1 title=$2 @@ -162,7 +163,7 @@ fn_install_menu_bash() { done } -# Whiptail/Dialog Menu +# Whiptail/Dialog menu. fn_install_menu_whiptail() { local menucmd=$1 local resultvar=$2 @@ -187,14 +188,14 @@ fn_install_menu_whiptail() { fi } -# Menu selector +# Menu selector. fn_install_menu() { local resultvar=$1 local selection="" title=$2 caption=$3 options=$4 - # Get menu command + # Get menu command. for menucmd in whiptail dialog bash; do if [ -x "$(command -v "${menucmd}")" ]; then menucmd=$(command -v "${menucmd}") @@ -210,7 +211,7 @@ fn_install_menu() { eval "$resultvar=\"${selection}\"" } -# Gets server info from serverlist.csv and puts in to array +# Gets server info from serverlist.csv and puts in to array. fn_server_info(){ IFS="," server_info_array=($(grep -aw "${userinput}" "${serverlist}")) @@ -228,7 +229,7 @@ fn_install_getopt(){ echo -e "" echo -e "Commands" echo -e "install\t\t| Select server to install." - echo -e "servername\t| e.g $0 csgoserver. Enter name of server/game to install." + echo -e "servername\t| Enter name of game server to install. e.g $0 csgoserver." echo -e "list\t\t| List all servers available for install." exit } @@ -273,7 +274,7 @@ if [ "$(whoami)" == "root" ]; then fi fi -# LinuxGSM installer mode +# LinuxGSM installer mode. if [ "${shortname}" == "core" ]; then # Download the latest serverlist. This is the complete list of all supported servers. fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" @@ -282,13 +283,14 @@ if [ "${shortname}" == "core" ]; then exit 1 fi - if [ "${userinput}" == "list" ]; then + if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then { - tail -n +2 "${serverlist}"|awk -F "," '{print $2 "\t" $3}' + tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then - fn_install_menu result "LinuxGSM" "Select game to install" "${serverlist}" + tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" + fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" fn_server_info if [ "${result}" == "${gameservername}" ]; then @@ -311,11 +313,11 @@ if [ "${shortname}" == "core" ]; then fn_install_getopt fi -# LinuxGSM Server Mode +# LinuxGSM server mode. else core_functions.sh if [ "${shortname}" != "core-dep" ]; then - # Load LinuxGSM configs + # Load LinuxGSM configs. # These are required to get all the default variables for the specific server. # Load the default config. If missing download it. If changed reload it. if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then @@ -349,14 +351,14 @@ else fi fi source "${configdirserver}/_default.cfg" - # Load the common.cfg config. If missing download it + # Load the common.cfg config. If missing download it. if [ ! -f "${configdirserver}/common.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" source "${configdirserver}/common.cfg" else source "${configdirserver}/common.cfg" fi - # Load the instance.cfg config. If missing download it + # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${servicename}.cfg" ]; then fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" source "${configdirserver}/${servicename}.cfg" @@ -364,14 +366,14 @@ else source "${configdirserver}/${servicename}.cfg" fi - # Load the linuxgsm.sh in to tmpdir. If missing download it + # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fi fi - # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off + # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. fn_ansi_loader - # Prevents running of core_exit.sh for Travis. + # Prevents running of core_exit.sh for Travis-CI. if [ "${travistest}" != "1" ]; then getopt=$1 core_getopt.sh