From 56b87ef23177a695c3e71a1971fca75818c6ae77 Mon Sep 17 00:00:00 2001 From: ttocszed00 Date: Thu, 18 Jun 2020 04:53:20 +0900 Subject: [PATCH 1/3] fix(details): fix if typo in starbound details (#2929) --- lgsm/functions/info_messages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 063914497..eb0ed43cf 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -1462,7 +1462,7 @@ fn_info_message_select_engine(){ fn_info_message_sof2 elif [ "${shortname}" == "sol" ]; then fn_info_message_soldat - elif [ "${shortname}" == "st" ]; then + elif [ "${shortname}" == "sb" ]; then fn_info_message_starbound elif [ "${shortname}" == "sbots" ]; then fn_info_message_sbots From 8ebeac900cf436ac6b43e66b630cdf9524a09bbb Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 17 Jun 2020 21:54:49 +0200 Subject: [PATCH 2/3] fix(av): fix post install for Avorion #2925 (#2928) --- lgsm/functions/fix_av.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/fix_av.sh b/lgsm/functions/fix_av.sh index bf9ff2b4b..3edf7862b 100644 --- a/lgsm/functions/fix_av.sh +++ b/lgsm/functions/fix_av.sh @@ -10,7 +10,7 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" if [ "${postinstall}" == "1" ]; then fn_parms(){ - parms="--datapath ${avdatapath} --galaxy-name ${avgalaxy} --init-folders-only" + parms="--datapath ${avdatapath} --galaxy-name ${selfname} --init-folders-only" } fn_print_information "starting ${gamename} server to generate configs." From dc70753ead2e47106cc19deeffc6d69428d5ead3 Mon Sep 17 00:00:00 2001 From: Jimmy Maple <38733055+jimmyatSplunk@users.noreply.github.com> Date: Wed, 17 Jun 2020 16:08:41 -0400 Subject: [PATCH 3/3] fix(query): query_gamedig.sh tuning for correct player count (#2913) * fix(bug): gamedig not using correct JSON object Command to output the results for player count was looking at the wrong object in the tree. This change corrects it to the right objects. * feat(monitor): Include bot count in monitor output Update to include bot count in monitor output from Gamedig. * fix(messages): Fix to set proper component logging Fixed issue where messages from different actions weren't logging correctly due to using the wrong variable in when crafting the log message * Confirm commit for changes made Commit changes made after pull change submiited. * fix(command_backup): Correct path for exludedir variable The current implementation doesn't use the full file path to determine the existence of the backup directory in relation to the server which means the current stats just looks for the "lgsm/backup" directory. That may work if you're already in the root directory for the server but if you're scripting the backups via cron, you're not likely going to be invoking the backup from the root directory. * fix: query_gamedig.sh tuning for correct player count Reworked the jq flags to produce a count of players based on the length of the original JSON key used. However, I've found that while things like TF2 will produce the proper value, the Minecraft plugin will have an extra user online that is empty. See example below: "players": [ { "id": "81eeda65-9002-4f0d-9d3f-b4872e2a2042", "name": "iamjack1221" }, {} ] * correct else * space Co-authored-by: Daniel Gibbs --- lgsm/functions/query_gamedig.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 285cf0805..071645b49 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -22,7 +22,6 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${ip}\" --port \"${queryport}\"|jq") gamedigraw=$(gamedig --type "${querytype}" --host "${ip}" --port "${queryport}") querystatus=$(echo "${gamedigraw}" | jq '.error|length') - fi # server name. @@ -32,10 +31,14 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi # numplayers. - gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.vanilla.raw.players.online') + if [ "${querytype}" == "minecraft" ]; then + gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1') + else + gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length') + fi if [ "${gdplayers}" == "null" ]; then unset gdplayers - elif [ "${gdplayers}" == "[]" ]; then + elif [ "${gdplayers}" == "[]" ] || [ "${gdplayers}" == "-1" ]; then gdplayers=0 fi @@ -60,7 +63,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi # numbots. - gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots') + gdbots=$(echo "${gamedigraw}" | jq -re '.bots | length') if [ "${gdbots}" == "null" ]||[ "${gdbots}" == "0" ]; then unset gdbots fi