From ddcd37a41936b104119c82c73800987a8eaea874 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 28 Oct 2025 14:48:23 +0100 Subject: [PATCH] fixes --- ct/reitti.sh | 16 +++++++++++++++- misc/build.func | 2 +- misc/tools.func | 3 ++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ct/reitti.sh b/ct/reitti.sh index 1460c7503..e0f9b7647 100644 --- a/ct/reitti.sh +++ b/ct/reitti.sh @@ -39,7 +39,21 @@ function update_script() { msg_info "Starting Service" systemctl start reitti msg_ok "Started Service" - msg_ok "Updated Successfully" + msg_ok "Updated Successfully!" + fi + if check_for_gh_release "photon" "dedicatedcode/reitti"; then + msg_info "Stopping Service" + systemctl stop photon + msg_ok "Stopped Service" + + rm -f /opt/photon/photon.jar + USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "photon" "komoot/photon" "singlefile" "latest" "/opt/photon" "photon-0*.jar" + mv /opt/photon/photon-*.jar /opt/photon/photon.jar + + msg_info "Starting Service" + systemctl start photon + msg_ok "Started Service" + msg_ok "Updated Successfully!" fi exit } diff --git a/misc/build.func b/misc/build.func index b776fdb4b..01050c57c 100644 --- a/misc/build.func +++ b/misc/build.func @@ -3012,7 +3012,7 @@ create_lxc_container() { pveam update >/dev/null 2>&1 || msg_warn "Could not update template catalog (pveam update failed)." #echo "[DEBUG] pveam available output (first 5 lines with .tar files):" - pveam available -section system 2>/dev/null | grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' | head -5 | sed 's/^/ /' + #pveam available -section system 2>/dev/null | grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' | head -5 | sed 's/^/ /' set +u mapfile -t ONLINE_TEMPLATES < <(pveam available -section system 2>/dev/null | grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' | awk '{print $2}' | grep -E "${SEARCH_PATTERN}.*${TEMPLATE_PATTERN}" | sort -t - -k 2 -V 2>/dev/null || true) diff --git a/misc/tools.func b/misc/tools.func index 1914bc894..fb96ed0ee 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -2536,7 +2536,8 @@ function setup_java() { fi # Validate INSTALLED_VERSION is not empty if matched - if [[ -z "$INSTALLED_VERSION" && $(dpkg -l 2>/dev/null | grep -c "temurin-.*-jdk" || echo "0") -gt 0 ]]; then + local JDK_COUNT=$(dpkg -l 2>/dev/null | grep -c "temurin-.*-jdk" || echo "0") + if [[ -z "$INSTALLED_VERSION" && "$JDK_COUNT" -gt 0 ]]; then msg_warn "Found Temurin JDK but cannot determine version" INSTALLED_VERSION="0" fi