Compare commits

...

6 Commits

Author SHA1 Message Date
Michel Roegl-Brunner c46c5effbf Update fileflows.sh 2026-07-14 12:09:01 +02:00
Michel Roegl-Brunner 52a8649b5a fix(fileflows): handle update API failures and fix Node install
Server updates no longer abort on 401 or unreachable API; users can force deploy when security is enabled or the app is down. Node installs now pass --server during systemd setup, and Node updates skip the server-only API.
2026-07-14 12:04:22 +02:00
community-scripts-pr-app[bot] 09ec7b3203 Update CHANGELOG.md (#15765)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-07-14 10:02:33 +00:00
Michel Roegl-Brunner 55ab97a020 Revert "fix(fileflows): handle update API failures and fix Node install (#14858)" (#15764)
This reverts commit 171b954c7c.
2026-07-14 12:02:10 +02:00
community-scripts-pr-app[bot] b7a002cae4 Update CHANGELOG.md (#15762)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-07-14 10:00:47 +00:00
Michel Roegl-Brunner 171b954c7c fix(fileflows): handle update API failures and fix Node install (#14858)
Server updates no longer abort on 401 or unreachable API; users can force deploy when security is enabled or the app is down. Node installs now pass --server during systemd setup, and Node updates skip the server-only API.
2026-07-14 12:00:22 +02:00
3 changed files with 79 additions and 40 deletions
+3
View File
@@ -506,8 +506,11 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
### 🚀 Updated Scripts
- Revert "fix(fileflows): handle update API 401, force update, and Node install" [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#15764](https://github.com/community-scripts/ProxmoxVE/pull/15764))
- #### 🐞 Bug Fixes
- fix(fileflows): handle update API 401, force update, and Node install [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#14858](https://github.com/community-scripts/ProxmoxVE/pull/14858))
- [Upstream Fix] Immich: Fix loader priority [@vhsdream](https://github.com/vhsdream) ([#15755](https://github.com/community-scripts/ProxmoxVE/pull/15755))
## 2026-07-13
+71 -38
View File
@@ -31,50 +31,83 @@ function update_script() {
exit
fi
update_available=$(curl -fsSL -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable)
if [[ "${update_available}" == "true" ]]; then
msg_info "Stopping Service"
systemctl --all stop 'fileflows*'
msg_info "Stopped Service"
local proceed=false
msg_info "Creating Backup"
ls /opt/*.tar.gz &>/dev/null && rm -f /opt/*.tar.gz
backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz"
tar -czf "$backup_filename" -C /opt/fileflows Data
msg_ok "Backup Created"
# FileFlows tracks the latest release, whose .NET target can move (e.g. 8 -> 10);
# ensure the current ASP.NET Core Runtime so an existing install doesn't fail to
# start after updating to a newer .NET major version.
msg_info "Ensuring ASP.NET Core Runtime"
if [[ "$(arch_resolve)" == "arm64" ]]; then
if [[ ! -x /usr/lib/dotnet10/dotnet ]]; then
curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh
$STD bash /tmp/dotnet-install.sh --channel 10.0 --runtime aspnetcore --install-dir /usr/lib/dotnet10
ln -sf /usr/lib/dotnet10/dotnet /usr/bin/dotnet
rm -f /tmp/dotnet-install.sh
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
elif ! is_package_installed "aspnetcore-runtime-10.0"; then
$STD apt remove -y aspnetcore-runtime-8.0 aspnetcore-runtime-9.0 2>/dev/null || true
setup_deb822_repo \
"microsoft" \
"https://packages.microsoft.com/keys/microsoft-2025.asc" \
"https://packages.microsoft.com/debian/13/prod/" \
"trixie"
$STD apt install -y aspnetcore-runtime-10.0
fi
msg_ok "Ensured ASP.NET Core Runtime"
fetch_and_deploy_from_url "https://fileflows.com/downloads/zip" "/opt/fileflows"
msg_info "Starting Service"
systemctl --all start 'fileflows*'
msg_ok "Started Service"
msg_ok "Updated successfully!"
else
msg_ok "No update required. ${APP} is already at latest version"
proceed=true
fi
if [[ "$proceed" != "true" ]]; then
exit
fi
msg_info "Stopping Service"
systemctl --all stop 'fileflows*'
msg_ok "Stopped Service"
msg_info "Creating Backup"
ls /opt/*.tar.gz &>/dev/null && rm -f /opt/*.tar.gz
backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz"
tar -czf "$backup_filename" -C /opt/fileflows Data
msg_ok "Backup Created"
msg_info "Ensuring ASP.NET Core Runtime"
if [[ "$(arch_resolve)" == "arm64" ]]; then
if [[ ! -x /usr/lib/dotnet10/dotnet ]]; then
curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh
$STD bash /tmp/dotnet-install.sh --channel 10.0 --runtime aspnetcore --install-dir /usr/lib/dotnet10
ln -sf /usr/lib/dotnet10/dotnet /usr/bin/dotnet
rm -f /tmp/dotnet-install.sh
fi
elif ! is_package_installed "aspnetcore-runtime-10.0"; then
$STD apt remove -y aspnetcore-runtime-8.0 aspnetcore-runtime-9.0 2>/dev/null || true
setup_deb822_repo \
"microsoft" \
"https://packages.microsoft.com/keys/microsoft-2025.asc" \
"https://packages.microsoft.com/debian/13/prod/" \
"trixie"
$STD apt install -y aspnetcore-runtime-10.0
fi
msg_ok "Ensured ASP.NET Core Runtime"
fetch_and_deploy_from_url "https://fileflows.com/downloads/zip" "/opt/fileflows"
msg_info "Starting Service"
systemctl --all start 'fileflows*'
msg_ok "Started Service"
msg_ok "Updated successfully!"
exit
}
+5 -2
View File
@@ -55,9 +55,12 @@ if [[ "$install_server" =~ ^[Ss]$ ]]; then
msg_ok "Installed FileFlows Server"
else
msg_info "Installing FileFlows Node"
read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url
while [[ -z "${server_url// /}" ]]; do
read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url
done
cd /opt/fileflows/Node
$STD dotnet FileFlows.Node.dll
$STD dotnet FileFlows.Node.dll --systemd install --root true
$STD dotnet FileFlows.Node.dll --server "$server_url" --systemd install --root true
systemctl enable -q --now fileflows-node
msg_ok "Installed FileFlows Node"
fi