From 9f4f97d191dba7e3c02ef87df464adafd50cb989 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2017 19:04:57 +0000 Subject: [PATCH 01/23] added Just Cause 3 --- lgsm/data/serverlist.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index a79a71552..a0ac22793 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -33,6 +33,7 @@ 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 From 62c04ba201a2a97760bef8e8a536ec60f35da9cd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2017 19:09:21 +0000 Subject: [PATCH 02/23] Just Cause 3 config --- .../config-lgsm/jc3server/_default.cfg | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 lgsm/config-default/config-lgsm/jc3server/_default.cfg diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg new file mode 100644 index 000000000..3bfacac30 --- /dev/null +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -0,0 +1,115 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT WILL BE OVERWRITTEN! +# Copy settings from here and use them in either +# common.cfg - applies settings to every instance +# [instance].cfg - applies settings to a specific instance + +#### Server Settings #### + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) + +# More info | https://github.com/GameServerManagers/LinuxGSM/wiki/Alerts#more-info +postalert="off" +postdays="7" +posttarget="https://hastebin.com" + +# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/mailgun +mailgunalert="off" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushover +pushoveralert="off" +pushovertoken="accesstoken" + +# Telegram Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Telegram +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="619960" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## LinuxGSM Server Details +# Do not edit +gamename="Just Cause 2" +engine="avalanche" + +#### Directories #### +# Edit with care + +## Server Specific Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./Jcmp-Server" +servercfg="config.lua" +servercfgdefault="config.lua" +servercfgdir="${serverfiles}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +logdir="${rootdir}/log" +#gamelogdir="" # No server logs available +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +alertlog="${lgsmlogdir}/${servicename}-alert.log" +postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" From 0af0cbd74bf964fa7199c6d54d49210b34f3d854 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2017 19:16:23 +0000 Subject: [PATCH 03/23] updated gamename --- lgsm/config-default/config-lgsm/jc3server/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index 3bfacac30..cdc984ae6 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -82,7 +82,7 @@ branch="" ## LinuxGSM Server Details # Do not edit -gamename="Just Cause 2" +gamename="Just Cause 3" engine="avalanche" #### Directories #### From 188d7799f288966bd6c1ec84662ae976f672a7e1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2017 19:28:30 +0000 Subject: [PATCH 04/23] Updated exec locations --- lgsm/config-default/config-lgsm/jc3server/_default.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index cdc984ae6..59e008f24 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -91,9 +91,9 @@ engine="avalanche" ## Server Specific Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable="./Jcmp-Server" -servercfg="config.lua" -servercfgdefault="config.lua" +executable="./Server" +servercfg="config.json" +servercfgdefault="config.json" servercfgdir="${serverfiles}" servercfgfullpath="${servercfgdir}/${servercfg}" From d95a66ec51476e7160e9b01b17c5a06983c804e1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2017 21:19:28 +0000 Subject: [PATCH 05/23] Added Just Cause 3 config --- lgsm/functions/install_config.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 4def0ecf0..8fe08e095 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -336,6 +336,12 @@ elif [ "${gamename}" == "Just Cause 2" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Just Cause 3" ]; then + gamedirname="JustCause3" + array_configs+=( config.json ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "Killing Floor" ]; then gamedirname="KillingFloor" array_configs+=( Default.ini ) From 8dad7c5469d04eeb4b44585d7835b867c33c6cf2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2017 22:14:15 +0000 Subject: [PATCH 06/23] added details for JC3 --- lgsm/functions/info_config.sh | 46 +++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 5127ffa4f..cb2c8ad1e 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -14,7 +14,7 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # grep -v "foo" filter out lines that contain foo # cut -f1 -d "/" remove everything after / -fn_info_config_avalanche(){ +fn_info_config_justcause2(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -38,6 +38,38 @@ fn_info_config_avalanche(){ fi } +fn_info_config_justcause3(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryPort="${zero}" + steamport="${zero}" + tickrate="${zero}" + else + serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "\"maxPlayers\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + port=$(grep "\"port\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + steamport=$(grep "\"queryPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + steamport=$(grep "\"steamPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + tickrate=$(grep "\"maxTickRate\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + + ip=$(grep "host" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/host//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ipsetinconfig=1 + ipinconfigvar="host" + + # Not Set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers=:-"0"} + port=${port=:-"0"} + queryport=${queryport=:-"0"} + steamport=${steamport=:-"0"} + tickrate=${tickrate=:-"0"} + fi +} + fn_info_config_ark(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -853,11 +885,9 @@ fn_info_config_squad(){ maxplayers=${maxplayers:-"0"} } -# Just Cause 2 -if [ "${engine}" == "avalanche" ]; then - fn_info_config_avalanche + # ARK: Survival Evolved -elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then +if [ "${gamename}" == "ARK: Survivial Evolved" ]; then fn_info_config_ark # Ballistic Overkill elif [ "${gamename}" == "Ballistic Overkill" ]; then @@ -883,6 +913,12 @@ elif [ "${engine}" == "dontstarve" ]; then # Factorio elif [ "${gamename}" == "Factorio" ]; then fn_info_config_factorio +# Just Cause 2 +if [ "${gamename}" == "Just Cause 2" ]; then + fn_info_config_justcause2 +# Just Cause 3 +if [ "${gamename}" == "Just Cause 3" ]; then + fn_info_config_justcause3 # Killing Floor 2 elif [ "${shortname}" == "kf2" ]; then fn_info_config_kf2 From d6617175e04f18b35c5f61c336f51be358431f92 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2017 22:14:43 +0000 Subject: [PATCH 07/23] corrected queryport --- lgsm/functions/info_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index cb2c8ad1e..0bb37947d 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -51,7 +51,7 @@ fn_info_config_justcause3(){ serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "\"maxPlayers\"" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "\"port\"" "${servercfgfullpath}" | tr -cd '[:digit:]') - steamport=$(grep "\"queryPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + queryport=$(grep "\"queryPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') steamport=$(grep "\"steamPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') tickrate=$(grep "\"maxTickRate\"" "${servercfgfullpath}" | tr -cd '[:digit:]') From ae15e4252261d27385c4d4626c2413b3bce59c96 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2017 22:25:00 +0000 Subject: [PATCH 08/23] fixed bugs --- lgsm/functions/info_config.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 0bb37947d..694a3407f 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -507,7 +507,7 @@ fn_info_config_starbound(){ # Not Set servername=${servername:-"NOT SET"} queryenabled=${queryenabled:-"NOT SET"} - rconenabled==${rconenabled:-"NOT SET"} + rconenabled=${rconenabled:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} port=${port:-"21025"} queryport=${queryport:-"21025"} @@ -914,10 +914,10 @@ elif [ "${engine}" == "dontstarve" ]; then elif [ "${gamename}" == "Factorio" ]; then fn_info_config_factorio # Just Cause 2 -if [ "${gamename}" == "Just Cause 2" ]; then +elif [ "${gamename}" == "Just Cause 2" ]; then fn_info_config_justcause2 # Just Cause 3 -if [ "${gamename}" == "Just Cause 3" ]; then +elif [ "${gamename}" == "Just Cause 3" ]; then fn_info_config_justcause3 # Killing Floor 2 elif [ "${shortname}" == "kf2" ]; then From 324846d8f4fef240394569cd71166ef6b8dfc106 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2017 22:28:48 +0000 Subject: [PATCH 09/23] update glibc for JC3 --- lgsm/functions/info_glibc.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index a6f005c42..c0844beef 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -107,9 +107,12 @@ elif [ "${gamename}" == "TeamSpeak 3" ]; then elif [ "${gamename}" == "Teeworlds" ]; then glibcrequired="2.14" glibcfix="no" -elif [ "${engine}" == "avalanche" ]; then +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" From f72e22a51d0ba6caed53001935630795c8b1ebdc Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2017 22:34:49 +0000 Subject: [PATCH 10/23] updated for JC3 --- lgsm/functions/info_messages.sh | 35 ++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 5cf46a89a..8f0729926 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -502,15 +502,6 @@ fn_info_message_ballisticoverkill(){ } | column -s $'\t' -t } -fn_info_message_avalanche(){ - echo -e "netstat -atunp | grep Jcmp-Server" - echo -e "" - { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" - } | column -s $'\t' -t -} - fn_info_message_cod(){ echo -e "netstat -atunp | grep cod_lnxded" echo -e "" @@ -597,6 +588,26 @@ fn_info_message_hurtworld(){ } | column -s $'\t' -t } +fn_info_message_justcause2(){ + echo -e "netstat -atunp | grep Jcmp-Server" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + } | column -s $'\t' -t +} + +fn_info_message_justcause3(){ + echo -e "netstat -atunp | grep Server" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + echo -e "> Steam\tINBOUND\t${steamport}\tudp" + } | column -s $'\t' -t +} + fn_info_message_minecraft(){ echo -e "netstat -atunp | grep java" echo -e "" @@ -985,6 +996,10 @@ fn_info_message_select_engine(){ fn_info_message_factorio elif [ "${gamename}" == "Hurtworld" ]; then fn_info_message_hurtworld + elif [ "${gamename}" == "Just Cause 2" ]; then + fn_info_message_justcause2 + elif [ "${gamename}" == "Just Cause 3" ]; then + fn_info_message_justcause3 elif [ "${shortname}" == "kf2" ]; then fn_info_message_kf2 elif [ "${gamename}" == "Project Cars" ]; then @@ -1013,8 +1028,6 @@ fn_info_message_select_engine(){ fn_info_message_rust elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then fn_info_message_wolfensteinenemyterritory - elif [ "${engine}" == "avalanche" ]; then - fn_info_message_avalanche elif [ "${engine}" == "refractor" ]; then fn_info_message_refractor elif [ "${engine}" == "dontstarve" ]; then From ba143835c65cc7ce70c23ebdf8fe04b4b5809b6b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 20:51:30 +0000 Subject: [PATCH 11/23] Added JC3 servername and description --- lgsm/functions/info_config.sh | 4 ++++ lgsm/functions/info_messages.sh | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 694a3407f..ccf99dfe0 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -41,6 +41,7 @@ fn_info_config_justcause2(){ fn_info_config_justcause3(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" + serverdescription="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" port="${zero}" @@ -48,6 +49,8 @@ fn_info_config_justcause3(){ steamport="${zero}" tickrate="${zero}" else + servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverdescription=$(grep "description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "\"maxPlayers\"" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "\"port\"" "${servercfgfullpath}" | tr -cd '[:digit:]') @@ -61,6 +64,7 @@ fn_info_config_justcause3(){ # Not Set servername=${servername:-"NOT SET"} + serverdescription=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers=:-"0"} port=${port=:-"0"} diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 8f0729926..b3ae5c9e3 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -126,6 +126,11 @@ fn_info_message_gameserver(){ echo -e "${blue}Server name:\t${default}${servername}" fi + # Server description + if [ -n "${serverdescription}" ]; then + echo -e "${blue}Server name:\t${default}${serverdescription}" + fi + # Branch if [ -n "${branch}" ]; then echo -e "${blue}Branch:\t${default}${branch}" From 2044fa2bb3d313981333cca54108944a1201bdfe Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 21:03:36 +0000 Subject: [PATCH 12/23] Corrected server desc --- lgsm/functions/info_messages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index b3ae5c9e3..f6aa84b33 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -128,7 +128,7 @@ fn_info_message_gameserver(){ # Server description if [ -n "${serverdescription}" ]; then - echo -e "${blue}Server name:\t${default}${serverdescription}" + echo -e "${blue}Server Description:\t${default}${serverdescription}" fi # Branch From 0dd57c04857d8c73c48e2b7b947f54d509abf3f4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 21:42:19 +0000 Subject: [PATCH 13/23] changed avalanche to avalanche2.0 Just Cause 3 has an unspecified version of the avalanche engine. Will assume its version 3.0 --- lgsm/functions/command_details.sh | 2 +- lgsm/functions/command_monitor.sh | 2 +- lgsm/functions/command_postdetails.sh | 2 +- lgsm/functions/gsquery.py | 4 ++-- lgsm/functions/info_messages.sh | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 8800949e5..f63e39189 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -23,7 +23,7 @@ fn_info_message_gameserver fn_info_message_script fn_info_message_backup # Some game servers do not have parms. -if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${engine}" != "avalanche" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]&&[ "${engine}" != "renderware" ]; then +if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${engine}" != "avalanche2.0" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]&&[ "${engine}" != "renderware" ]; then fn_parms fn_info_message_commandlineparms fi diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index ec94e0426..a6e1c713a 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -79,7 +79,7 @@ fn_monitor_tmux(){ fn_print_ok_eol_nl fn_script_log_pass "Checking session: OK" # runs gsquery check on game with specific engines. - local allowed_engines_array=( avalanche goldsource idtech3 idtech3_ql iw2.0 iw3.0 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 ) + local allowed_engines_array=( avalanche2.0 goldsource idtech3 idtech3_ql iw2.0 iw3.0 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "starbound" ]; then diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index c8f9c06a5..5360e998c 100644 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -62,7 +62,7 @@ else fn_info_message_script fn_info_message_backup # Some game servers do not have parms. - if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${engine}" != "avalanche" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]&&[ "${engine}" != "renderware" ]; then + if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${engine}" != "avalanche2.0" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]&&[ "${engine}" != "renderware" ]; then fn_parms fn_info_message_commandlineparms fi diff --git a/lgsm/functions/gsquery.py b/lgsm/functions/gsquery.py index c0192b6e1..a21b97f05 100644 --- a/lgsm/functions/gsquery.py +++ b/lgsm/functions/gsquery.py @@ -26,7 +26,7 @@ class PythonGSQ: self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00' elif self.option.engine in idtech3query: self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' - elif self.option.engine == 'avalanche': + elif self.option.engine == 'avalanche2.0': self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40' elif self.option.engine == 'unreal': self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C' @@ -100,7 +100,7 @@ if __name__ == '__main__': action='store', dest='engine', default=False, - help='Engine type: avalanche, goldsource, idtech2, idtech3, iw2.0, iw3.0, realvirtuality, quake, quakelive, refractor, spark, source, unity3d, unreal, unreal2.' + help='Engine type: avalanche2.0, goldsource, idtech2, idtech3, iw2.0, iw3.0, realvirtuality, quake, quakelive, refractor, spark, source, unity3d, unreal, unreal2.' ) parser.add_option( '-v', '--verbose', diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index f6aa84b33..8a3cddb4e 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -402,7 +402,7 @@ fn_info_message_ports(){ parmslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file - local ports_edit_array=( "avalanche" "Ballistic Overkill" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) + local ports_edit_array=( "avalanche2.0" "Ballistic Overkill" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) for port_edit in "${ports_edit_array[@]}" do if [ "${shortname}" == "ut3" ]; then From 3aaa8050929fbdff5f582fed4c3425510f068574 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 21:43:00 +0000 Subject: [PATCH 14/23] changed engine to avalanche2.0 --- lgsm/config-default/config-lgsm/jc2server/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index 1cfce558f..6dafd3d93 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -83,7 +83,7 @@ branch="" ## LinuxGSM Server Details # Do not edit gamename="Just Cause 2" -engine="avalanche" +engine="avalanche2.0" #### Directories #### # Edit with care From 653c406b65bc15789746730bba6cefb36ba0d309 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 21:43:07 +0000 Subject: [PATCH 15/23] changed engine to avalanche3.0 --- lgsm/config-default/config-lgsm/jc3server/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index 59e008f24..84d0f0b22 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -83,7 +83,7 @@ branch="" ## LinuxGSM Server Details # Do not edit gamename="Just Cause 3" -engine="avalanche" +engine="avalanche3.0" #### Directories #### # Edit with care From bfd0493cf2cf2be2816abe13ec592c350a6206bd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 21:45:47 +0000 Subject: [PATCH 16/23] added avalanche3.0 engine --- lgsm/functions/gsquery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/gsquery.py b/lgsm/functions/gsquery.py index a21b97f05..bd1a2b953 100644 --- a/lgsm/functions/gsquery.py +++ b/lgsm/functions/gsquery.py @@ -17,7 +17,7 @@ class PythonGSQ: self.server_response_timeout = 5 self.default_buffer_length = 1024 # - sourcequery=['madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d'] + sourcequery=[ 'avalanche3.0','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d'] idtech2query=['idtech3','quake','iw3.0'] idtech3query=['idtech2','iw2.0'] if self.option.engine in sourcequery: From 7f2f6a6685634a44b5d060e9bd23d02931587bc8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 21:46:17 +0000 Subject: [PATCH 17/23] avalanche3.0 --- lgsm/functions/gsquery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/gsquery.py b/lgsm/functions/gsquery.py index bd1a2b953..bba0b97fd 100644 --- a/lgsm/functions/gsquery.py +++ b/lgsm/functions/gsquery.py @@ -100,7 +100,7 @@ if __name__ == '__main__': action='store', dest='engine', default=False, - help='Engine type: avalanche2.0, goldsource, idtech2, idtech3, iw2.0, iw3.0, realvirtuality, quake, quakelive, refractor, spark, source, unity3d, unreal, unreal2.' + help='Engine type: avalanche2.0, avalanche3.0, goldsource, idtech2, idtech3, iw2.0, iw3.0, realvirtuality, quake, quakelive, refractor, spark, source, unity3d, unreal, unreal2.' ) parser.add_option( '-v', '--verbose', From 1bc944482fce38786de8670fdeb72e19e8fb8d8c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 21:49:29 +0000 Subject: [PATCH 18/23] avalanche3.0 --- lgsm/functions/command_monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index a6e1c713a..dd8e41676 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -79,7 +79,7 @@ fn_monitor_tmux(){ fn_print_ok_eol_nl fn_script_log_pass "Checking session: OK" # runs gsquery check on game with specific engines. - local allowed_engines_array=( avalanche2.0 goldsource idtech3 idtech3_ql iw2.0 iw3.0 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 ) + local allowed_engines_array=( avalanche2.0 avalanche3.0 goldsource idtech3 idtech3_ql iw2.0 iw3.0 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "starbound" ]; then From e261e241db538fb64fda39fe53ab79e8cdcadb20 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 21:54:29 +0000 Subject: [PATCH 19/23] avalanche3.0 --- lgsm/functions/info_messages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 8a3cddb4e..d765216b0 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -402,7 +402,7 @@ fn_info_message_ports(){ parmslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file - local ports_edit_array=( "avalanche2.0" "Ballistic Overkill" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) + local ports_edit_array=( "avalanche2.0" "avalanche3.0" "Ballistic Overkill" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) for port_edit in "${ports_edit_array[@]}" do if [ "${shortname}" == "ut3" ]; then From 34595af785322bf58edfe2815310fb6927c886fa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 22:02:50 +0000 Subject: [PATCH 20/23] fixed serverdescription error --- lgsm/functions/info_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index ccf99dfe0..898191d34 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -64,7 +64,7 @@ fn_info_config_justcause3(){ # Not Set servername=${servername:-"NOT SET"} - serverdescription=${servername:-"NOT SET"} + serverdescription=${serverdescription:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers=:-"0"} port=${port=:-"0"} From 817b15a02f3abe2ebbd056b42f80f5415468b500 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 22:14:59 +0000 Subject: [PATCH 21/23] added avalanche engines to CTRL+c exit --- 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 9b76089af..1d5f37473 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -189,7 +189,7 @@ fn_stop_graceful_select(){ fn_stop_graceful_cmd "quit" 120 elif [ "${engine}" == "goldsource" ]; then fn_stop_graceful_goldsource - elif [ "${gamename}" == "Factorio" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${gamename}" == "Mumble" ]; then + elif [ "${engine}" == "avalanche2.0" ]||[ "${engine}" == "avalanche3.0" ]||[ "${gamename}" == "Factorio" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal4" ]||[ "${engine}" == "unreal3" ]||[ "${engine}" == "unreal2" ]||[ "${engine}" == "unreal" ]||[ "${gamename}" == "Mumble" ]; then fn_stop_graceful_ctrlc elif [ "${engine}" == "source" ]||[ "${engine}" == "quake" ]||[ "${engine}" == "idtech2" ]||[ "${engine}" == "idtech3" ]||[ "${engine}" == "idtech3_ql" ]||[ "${engine}" == "Just Cause 2" ]||[ "${engine}" == "projectzomboid" ]; then fn_stop_graceful_cmd "quit" 30 From 9a98deb6fa722961c48e438c1aa7125de8befb29 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 22:18:21 +0000 Subject: [PATCH 22/23] Added description to Just Cause 2 --- lgsm/functions/info_config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 898191d34..1f01db5e3 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -22,6 +22,7 @@ fn_info_config_justcause2(){ port="${zero}" else servername=$(grep "Name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverdescription=$(grep "Description" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Description//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') port=$(grep "BindPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') From efbbe4186583c3e2d7d03657a314cff0d8c42467 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 5 Dec 2017 23:25:03 +0000 Subject: [PATCH 23/23] Fixed issue identifying ip not being set in game config if 1 IP if server has single IP and required IP to be specified in game config check_ip was not detecting the issue --- lgsm/functions/check_ip.sh | 55 +++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index c0985f850..7b8d9f3eb 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -17,37 +17,62 @@ if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${gamename}" != "Mumble" ]&&[ "${travi getip=$(${ipcommand} -o -4 addr|awk '{print $4}'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0) getipwc=$(${ipcommand} -o -4 addr|awk '{print $4}'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -vc 127.0.0) info_config.sh + + # IP is not set to specific IP if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then + fn_print_dots "Check IP" + sleep 1 + # Multiple interfaces if [ "${getipwc}" -ge "2" ]; then - fn_print_dots "Check IP" - sleep 1 - fn_print_fail "Check IP: Multiple active network interfaces found." + fn_print_fail "Check IP: Multiple IP addresses found." sleep 1 echo -en "\n" + # IP is set within game config if [ "${ipsetinconfig}" == "1" ]; then - fn_print_information "Specify the IP you want to use within the game server config file ${servercfg}.\n" - echo -en "${servercfgfullpath}\n" + fn_print_information "Specify the IP you want to bind within ${servercfg}.\n" + echo -en " * location: ${servercfgfullpath}\n" + echo -en "\n" echo -en "Set ${ipinconfigvar} to one of the following:\n" + fn_script_log_fatal "Multiple IP addresses found." + fn_script_log_fatal "Specify the IP you want to bind within: ${servercfgfullpath}." + # IP is set within LinuxGSM config else - fn_print_information_nl "Specify the IP you want to use within a LinuxGSM config file." - echo -en "location: ${configdirserver}\n" - echo "" + fn_print_information_nl "Specify the IP you want to bind within a LinuxGSM config file.\n" + echo -en " * location: ${configdirserver}\n" + echo -en "\n" echo -en "Set ip=\"0.0.0.0\" to one of the following:\n" + fn_script_log_fatal "Multiple IP addresses found." + if [ "${legacymode}" == "1" ]; then + fn_script_log_fatal "Specify the IP you want to bind within the ${selfname} script." + else + fn_script_log_fatal "Specify the IP you want to bind within: ${configdirserver}." + fi fi echo -en "${getip}\n" + echo -en "\n" + echo -en "https://gameservermanagers.com/network-interfaces\n" echo -en "" + fn_script_log_fatal "https://gameservermanagers.com/network-interfaces\n" + core_exit.sh + # Single interface + elif [ "${ipsetinconfig}" == "1" ]; then + fn_print_fail "Check IP: IP address not set in game config." + sleep 1 + echo -en "\n" + fn_print_information "Specify the IP you want to bind within ${servercfg}.\n" + echo -en " * location: ${servercfgfullpath}\n" + echo -en "\n" + echo -en "Set ${ipinconfigvar} to the following:\n" + echo -en "${getip}\n" + echo -en "\n" echo -en "https://gameservermanagers.com/network-interfaces\n" echo -en "" - fn_script_log_fatal "Multiple active network interfaces found." - if [ "${legacymode}" == "1" ]; then - fn_script_log_fatal "Manually specify the IP you want to use within the ${selfname} script." - else - fn_script_log_fatal "Manually specify the IP you want to use within: ${configdirserver}." - fi + fn_script_log_fatal "IP address not set in game config." + fn_script_log_fatal "Specify the IP you want to bind within: ${servercfgfullpath}." fn_script_log_fatal "https://gameservermanagers.com/network-interfaces\n" core_exit.sh else - ip=${getip} + ip="${getip}" fi fi fi