Compare commits

..

1 Commits

Author SHA1 Message Date
Michel Roegl-Brunner
765ed94b3a fix(fileflows): handle update API 401 and skip check on Node
Server installs check update-available without curl -f so 401 is handled with a clear message instead of aborting via catch_errors. Node installs skip the API and always run the zip update.

Fixes #14622

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-01 15:54:34 +02:00
9 changed files with 41 additions and 55 deletions

View File

@@ -336,18 +336,14 @@ jobs:
issue_scripts+=("$slug|$our_version|$upstream_major|$upstream_hint|$repo")
drift_count=$((drift_count + 1))
elif [[ -n "$upstream_major" && "$our_version" != "$upstream_major" ]]; then
if (( our_version < upstream_major )); then
# Check if engines.node is a minimum constraint that our version satisfies
if [[ -z "$DF_NODE_MAJOR" && "$ENGINES_IS_MINIMUM" == "true" ]] && \
version_satisfies_engines "$our_version" "$ENGINES_MIN_MAJOR" "$ENGINES_IS_MINIMUM"; then
status="✅ (engines: $ENGINES_NODE_RAW — ours: $our_version satisfies)"
else
status="🔸 Drift → upstream=$upstream_major ($upstream_hint)"
issue_scripts+=("$slug|$our_version|$upstream_major|$upstream_hint|$repo")
drift_count=$((drift_count + 1))
fi
# Check if engines.node is a minimum constraint that our version satisfies
if [[ -z "$DF_NODE_MAJOR" && "$ENGINES_IS_MINIMUM" == "true" ]] && \
version_satisfies_engines "$our_version" "$ENGINES_MIN_MAJOR" "$ENGINES_IS_MINIMUM"; then
status="✅ (engines: $ENGINES_NODE_RAW — ours: $our_version satisfies)"
else
status="✅ Ahead of upstream ($upstream_major via $upstream_hint)"
status="🔸 Drift → upstream=$upstream_major ($upstream_hint)"
issue_scripts+=("$slug|$our_version|$upstream_major|$upstream_hint|$repo")
drift_count=$((drift_count + 1))
fi
fi

View File

@@ -476,11 +476,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- fix(dispatcharr): forward nginx port for M3U URLs on new installs [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#14862](https://github.com/community-scripts/ProxmoxVE/pull/14862))
- Set environment paths in service for apprise-api-install.sh [@SystemIdleProcess](https://github.com/SystemIdleProcess) ([#14805](https://github.com/community-scripts/ProxmoxVE/pull/14805))
- fix(fireshare): rebuild client on update to fix nginx 500 [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#14848](https://github.com/community-scripts/ProxmoxVE/pull/14848))
- Fix Kan build failure (TS7016 nodemailer) [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#14856](https://github.com/community-scripts/ProxmoxVE/pull/14856))
- fix(firefly): set Data Importer APP_URL for subdirectory install [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#14847](https://github.com/community-scripts/ProxmoxVE/pull/14847))
- kan: extend fetch_and_deploy_gh_tag to use 'latest' tag [@MickLesk](https://github.com/MickLesk) ([#14853](https://github.com/community-scripts/ProxmoxVE/pull/14853))
- Glance: preserve glance.yml across updates [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#14845](https://github.com/community-scripts/ProxmoxVE/pull/14845))
- NginxProxymanager: set Certbot version in npm.service environment variable (2.15.0) [@MickLesk](https://github.com/MickLesk) ([#14843](https://github.com/community-scripts/ProxmoxVE/pull/14843))

View File

@@ -31,28 +31,39 @@ 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"
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"
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"
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" == "401" ]]; then
rm -f "$tmp"
msg_error "Could not check for updates: API returned 401. Disable security in FileFlows."
exit
fi
update_available=$(jq -r '.UpdateAvailable // false' "$tmp" 2>/dev/null)
rm -f "$tmp"
if [[ "${update_available}" != "true" ]]; then
msg_ok "No update required. ${APP} is already at latest version"
exit
fi
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"
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
}

View File

@@ -53,12 +53,6 @@ function update_script() {
export VIDEO_DIRECTORY=/opt/fireshare-videos
export PROCESSED_DIRECTORY=/opt/fireshare-processed
$STD uv run flask db upgrade
msg_info "Building Fireshare Client"
cd /opt/fireshare/app/client
$STD npm install
$STD npm run build
msg_ok "Built Fireshare Client"
msg_ok "Updated Fireshare"
msg_info "Starting Service"

View File

@@ -50,7 +50,7 @@ function update_script() {
cd /opt/kan
set -a && source /opt/kan/.env && set +a
export NEXT_PUBLIC_USE_STANDALONE_OUTPUT=true
$STD pnpm install --ignore-scripts --prod=false
$STD pnpm install --ignore-scripts
export CI=true
find /opt/kan/packages /opt/kan/apps -name 'tsconfig.json' -exec sed -i 's|"@kan/tsconfig/|"../../tooling/typescript/|g' {} +
$STD pnpm build --filter=@kan/web

View File

@@ -52,9 +52,6 @@ After=network-online.target
Type=simple
WorkingDirectory=/opt/apprise
ExecStart=/opt/apprise/webapp/supervisord-startup
Environment=APPRISE_CONFIG_DIR=/config
Environment=APPRISE_ATTACH_DIR=/attach
Environment=APPRISE_PLUGIN_PATHS=/plugin
Restart=always
RestartSec=30

View File

@@ -121,7 +121,6 @@ server {
# All other requests proxy to uWSGI
location / {
include proxy_params;
proxy_set_header X-Forwarded-Port \$server_port;
proxy_pass http://127.0.0.1:5656;
}
}

View File

@@ -37,13 +37,7 @@ msg_ok "Configured Firefly III"
msg_info "Configuring Data Importer"
cp /opt/firefly/dataimporter/.env.example /opt/firefly/dataimporter/.env
sed -i \
-e "s#FIREFLY_III_URL=#FIREFLY_III_URL=http://${LOCAL_IP}#g" \
-e "s|^APP_URL=.*|APP_URL=http://${LOCAL_IP}/dataimporter|" \
-e "s|^ASSET_URL=.*|ASSET_URL=/dataimporter|" \
/opt/firefly/dataimporter/.env
cd /opt/firefly/dataimporter
$STD php artisan config:clear
sed -i "s#FIREFLY_III_URL=#FIREFLY_III_URL=http://${LOCAL_IP}#g" /opt/firefly/dataimporter/.env
chown -R www-data:www-data /opt/firefly
msg_ok "Configured Data Importer"

View File

@@ -45,7 +45,7 @@ msg_info "Building Application"
cd /opt/kan
set -a && source /opt/kan/.env && set +a
export NEXT_PUBLIC_USE_STANDALONE_OUTPUT=true NEXT_PUBLIC_BASE_URL BETTER_AUTH_TRUSTED_ORIGINS NEXT_PUBLIC_ALLOW_CREDENTIALS BETTER_AUTH_SECRET
$STD pnpm install --ignore-scripts --prod=false
$STD pnpm install --ignore-scripts
export CI=true
find /opt/kan/packages /opt/kan/apps -name 'tsconfig.json' -exec sed -i 's|"@kan/tsconfig/|"../../tooling/typescript/|g' {} +
$STD pnpm build --filter=@kan/web