This commit is contained in:
parent
9f7a54dfb6
commit
ddcd37a419
16
ct/reitti.sh
16
ct/reitti.sh
@ -39,7 +39,21 @@ function update_script() {
|
|||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
systemctl start reitti
|
systemctl start reitti
|
||||||
msg_ok "Started Service"
|
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
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3012,7 +3012,7 @@ create_lxc_container() {
|
|||||||
pveam update >/dev/null 2>&1 || msg_warn "Could not update template catalog (pveam update failed)."
|
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):"
|
#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
|
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)
|
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)
|
||||||
|
|||||||
@ -2536,7 +2536,8 @@ function setup_java() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Validate INSTALLED_VERSION is not empty if matched
|
# 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"
|
msg_warn "Found Temurin JDK but cannot determine version"
|
||||||
INSTALLED_VERSION="0"
|
INSTALLED_VERSION="0"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user