diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 84333e6c8..cc054c129 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.0" +modulesversion="v23.2.3" # Core diff --git a/lgsm/functions/core_modules.sh b/lgsm/functions/core_modules.sh index 8eb843b5a..81a7a5ab6 100644 --- a/lgsm/functions/core_modules.sh +++ b/lgsm/functions/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.0" +modulesversion="v23.2.3" # Core diff --git a/lgsm/modules/check.sh b/lgsm/modules/check.sh index f0f49fc51..10fa080c6 100644 --- a/lgsm/modules/check.sh +++ b/lgsm/modules/check.sh @@ -77,7 +77,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do fi done -allowed_commands_array=(DEBUG START UPDATE VALIDATE) +allowed_commands_array=(DEBUG START UPDATE VALIDATE CHECK-UPDATE) for allowed_command in "${allowed_commands_array[@]}"; do if [ "${allowed_command}" == "${commandname}" ]; then if [ "${appid}" ]; then diff --git a/lgsm/modules/command_check_update.sh b/lgsm/modules/command_check_update.sh index f079f3616..c7780c355 100644 --- a/lgsm/modules/command_check_update.sh +++ b/lgsm/modules/command_check_update.sh @@ -6,7 +6,7 @@ # Description: Handles updating of servers. commandname="CHECK-UPDATE" -commandaction="check for Update" +commandaction="Check for Update" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh index 07a2ebd09..57e6d96d8 100644 --- a/lgsm/modules/core_functions.sh +++ b/lgsm/modules/core_functions.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.0" +modulesversion="v23.2.3" # Core diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 8eb843b5a..81a7a5ab6 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.2.0" +modulesversion="v23.2.3" # Core diff --git a/lgsm/modules/update_factorio.sh b/lgsm/modules/update_factorio.sh index 2d58f0cf9..2af9916aa 100644 --- a/lgsm/modules/update_factorio.sh +++ b/lgsm/modules/update_factorio.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles + # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz" "${serverfiles}" "factorio" fn_clear_tmp @@ -18,7 +18,7 @@ fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses executable to get local build. - if [ -d "${exutabledir}" ]; then + if [ -d "${executabledir}" ]; then cd "${executabledir}" || exit localbuild=$(${executable} --version | grep "Version:" | awk '{print $2}') fi diff --git a/lgsm/modules/update_jediknight2.sh b/lgsm/modules/update_jediknight2.sh index 8a6cd9bfc..d455a2722 100644 --- a/lgsm/modules/update_jediknight2.sh +++ b/lgsm/modules/update_jediknight2.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles + # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}/GameData" "linux-amd64" fn_clear_tmp diff --git a/lgsm/modules/update_minecraft.sh b/lgsm/modules/update_minecraft.sh index 69dc118b1..e764e846e 100644 --- a/lgsm/modules/update_minecraft.sh +++ b/lgsm/modules/update_minecraft.sh @@ -8,15 +8,16 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles - fn_fetch_file "${remotebuildurl}" "" "" "" "${serverfiles}" "minecraft_server.jar" "chmodx" "norun" "noforce" "nohash" + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "noforce" "nohash" + cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" } fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses executable to get local build. - if [ -d "${exutabledir}" ]; then + if [ -d "${executabledir}" ]; then cd "${executabledir}" || exit localbuild=$(unzip -p "minecraft_server.jar" version.json | jq -r '.id') fi @@ -45,6 +46,7 @@ fn_update_remotebuild() { else remotebuildversion=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${mcversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .id') fi + remotebuildfilename="minecraft_server.${remotebuildversion}.jar" # Generate link to version manifest json. remotebuildmanifest=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${remotebuildversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url') # Generate link to server.jar diff --git a/lgsm/modules/update_minecraft_bedrock.sh b/lgsm/modules/update_minecraft_bedrock.sh index a0d76aa20..075286096 100644 --- a/lgsm/modules/update_minecraft_bedrock.sh +++ b/lgsm/modules/update_minecraft_bedrock.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuildversion}.zip" + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuildversion}.zip" "nochmodx" "norun" "noforce" "nohash" echo -e "Extracting to ${serverfiles}...\c" if [ "${firstcommandname}" == "INSTALL" ]; then unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "server.properties" -d "${serverfiles}" diff --git a/lgsm/modules/update_papermc.sh b/lgsm/modules/update_papermc.sh index 447f8808a..b7bdee8fd 100644 --- a/lgsm/modules/update_papermc.sh +++ b/lgsm/modules/update_papermc.sh @@ -8,16 +8,17 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles - fn_fetch_file "${remotebuildurl}" "" "" "" "${serverfiles}" "${executable#./}" "chmodx" "norun" "force" "${remotebuildhash}" + # Download and extract files to serverfiles. + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "force" "${remotebuildhash}" + cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}" echo "${remotebuildversion}" > "${serverfiles}/build.txt" } fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" - # Uses version file to get local build. - localbuild=$(head -n 1 "${serverfiles}/build.txt") + # Uses build file to get local build. + localbuild=$(head -n 1 "${serverfiles}/build.txt" 2> /dev/null) if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" @@ -31,7 +32,7 @@ fn_update_localbuild() { fn_update_remotebuild() { # Get remote build info. - apiurl="https://papermc.io/api/v2/projects/" + apiurl="https://papermc.io/api/v2/projects" # Get list of projects. remotebuildresponse=$(curl -s "${apiurl}") # Get list of Minecraft versions for project. diff --git a/lgsm/modules/update_ts3.sh b/lgsm/modules/update_ts3.sh index dc79090ed..30dc9e513 100644 --- a/lgsm/modules/update_ts3.sh +++ b/lgsm/modules/update_ts3.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles + # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" "teamspeak3-server_linux_${ts3arch}" fn_clear_tmp diff --git a/lgsm/modules/update_ut99.sh b/lgsm/modules/update_ut99.sh index a1dc2b3dd..909286196 100644 --- a/lgsm/modules/update_ut99.sh +++ b/lgsm/modules/update_ut99.sh @@ -8,7 +8,7 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles + # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash" fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" echo "${remotebuildversion}" > "${serverfiles}/build.txt" @@ -19,7 +19,7 @@ fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses build file to get local build. - localbuild=$(head -n 1 "${serverfiles}/build.txt") + localbuild=$(head -n 1 "${serverfiles}/build.txt" 2> /dev/null) if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info" fn_script_log_error "Missing local build info" diff --git a/lgsm/modules/update_vintagestory.sh b/lgsm/modules/update_vintagestory.sh index 946b6ed0b..8fbc49044 100644 --- a/lgsm/modules/update_vintagestory.sh +++ b/lgsm/modules/update_vintagestory.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_dl() { - # Download and extract files to serverfiles + # Download and extract files to serverfiles. fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}" fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" fn_clear_tmp @@ -18,7 +18,7 @@ fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" # Uses executable to get local build. - if [ -d "${exutabledir}" ]; then + if [ -d "${executabledir}" ]; then cd "${executabledir}" || exit localbuild="$(${preexecutable} ${executable} --version | sed '/^[[:space:]]*$/d')" fi diff --git a/linuxgsm.sh b/linuxgsm.sh index dd7d51bb3..683b75710 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.0" +version="v23.2.3" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 97981c0cc..a8d1161f2 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.0" +version="v23.2.3" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 57dd28cc8..041b4c6d8 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.0" +version="v23.2.3" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index a32ffd8f5..009d97608 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.0" +version="v23.2.3" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 7d7ed7180..1db76c279 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.2.0" +version="v23.2.3" shortname="ts3" gameservername="ts3server" commandname="CORE"