Compare commits

..
Author SHA1 Message Date
github-actions[bot] ebd0d4a603 Update CHANGELOG.md 2026-11-21 14:39:23 +00:00
2 changed files with 42 additions and 15 deletions

No files matched your search

+6
View File
@@ -584,6 +584,12 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-11-21
### 💾 Core
- Tell a dead connection from a non-JSON answer in forge API calls [@MickLesk](https://github.com/MickLesk) ([core#285](https://github.com/community-scripts/core/pull/285))
## 2026-11-20
### 🆕 New Scripts
+36 -15
View File
@@ -32,24 +32,45 @@ function update_script() {
exit
fi
# Since 26.10 the REST API is off by default and answers 404, so compare the
# installed build with the version FileFlows' own updater asks for.
current_version=$(grep -h -m1 -oP '"FileFlows\.(Server|Agent)/\K[0-9.]+' /opt/fileflows/Server/FileFlows.Server.deps.json /opt/fileflows/Agent/FileFlows.Agent.deps.json 2>/dev/null | head -n1 || true)
latest_version=$(curl -fsSL --max-time 20 "https://fileflows.com/auto-update/latest-version?platform=linux" 2>/dev/null | tr -d '[:space:]' || true)
local proceed=false
if [[ "${FORCE_UPDATE:-}" == "1" ]]; then
msg_warn "FORCE_UPDATE=1: updating without the version check"
elif [[ ! "$latest_version" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
msg_warn "Could not get the latest ${APP} version from fileflows.com"
if ! prompt_confirm "${TAB3}Update without the version check?" "n" 60; then
msg_warn "Update skipped. Run 'FORCE_UPDATE=1 update' to update without the version check."
exit
if systemctl list-unit-files 'fileflows.service' --no-legend 2>/dev/null | grep -q '^fileflows\.service'; then
tmp=$(mktemp)
http_code=$(curl -sSL -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' -o "$tmp" -w '%{http_code}' 2>/dev/null) || http_code="000"
if [[ "$http_code" == "200" ]]; then
update_available=$(jq -r '.UpdateAvailable // false' "$tmp" 2>/dev/null)
rm -f "$tmp"
if [[ "${update_available}" == "true" ]]; then
proceed=true
else
msg_ok "No update required. ${APP} is already at latest version"
exit
fi
else
rm -f "$tmp"
if [[ "$http_code" == "401" ]]; then
msg_warn "Could not check for updates: API returned 401 (security may be enabled)."
else
msg_warn "Could not check for updates: API unreachable (HTTP ${http_code})."
fi
if [[ "${FORCE_UPDATE:-}" == "1" ]]; then
proceed=true
else
read -r -p "${TAB3}Force update without version check? [y/N]: " CONFIRM
if [[ "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then
proceed=true
else
msg_error "Update aborted."
exit
fi
fi
fi
elif [[ -n "$current_version" && "$(printf '%s\n' "$current_version" "$latest_version" | sort -V | tail -n1)" == "$current_version" ]]; then
msg_ok "No update required. ${APP} is already at v${current_version}"
exit
else
msg_ok "Update available: ${current_version:-unknown} -> ${latest_version}"
proceed=true
fi
if [[ "$proceed" != "true" ]]; then
exit
fi
msg_info "Stopping Service"