Compare commits

..

2 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
7 changed files with 86 additions and 251 deletions
+7 -40
View File
@@ -12,17 +12,13 @@ body:
Requests may be closed if the application is out of scope, abandoned, too new, not publicly verifiable, or not suitable for a reliable Proxmox VE Helper-Scripts integration.
General requirements:
- The application must be self-hosted.
- The project must have an official public source repository.
- The project must provide official releases, tags, or release tarballs.
- The project must be actively maintained.
- The official source repository must have at least 1,000 stars.
- The latest official release or tag must not be older than 6 months.
- The project itself must be at least 6 months old.
Projects that do not meet these requirements may be closed without further evaluation.
Exceptions to the 1,000-star requirement are rare and require a clearly verifiable, significant public adoption signal.
- The application should be self-hosted.
- The project should have an official public source repository.
- The project should provide official releases, tags, or release tarballs.
- The project should be actively maintained.
- The project should generally have at least 1,000 stars or a comparable public adoption signal.
- The latest official release or tag should not be older than 6 months.
- The project itself should be at least 6 months old.
- type: input
id: application-name
@@ -51,35 +47,6 @@ body:
validations:
required: true
- type: markdown
attributes:
value: |
## ⚠️ Project Eligibility
Before continuing, verify that the requested project meets the minimum requirements below.
**Projects with fewer than 1,000 stars are generally not eligible for a script request.**
Exceptions are only considered where there is a clearly verifiable, significant public adoption signal.
- type: input
id: repository-stars
attributes:
label: Repository Stars
description: Enter the current number of stars of the official source repository.
placeholder: "e.g., 15,000"
validations:
required: true
- type: checkboxes
id: minimum-stars
attributes:
label: Minimum Adoption Requirement
description: Confirm that you have verified the project's public adoption.
options:
- label: The official source repository has at least 1,000 stars.
required: true
- type: textarea
id: app-description
attributes:
+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
}
-54
View File
@@ -1,54 +0,0 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Raffaele (rafspiny)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://getgrav.org/
APP="Grav"
var_tags="${var_tags:-cms}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-no}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d "/opt/grav" ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "grav" "getgrav/grav"; then
msg_info "Creating Backup"
cd /opt/grav
bin/grav backup -nq
msg_ok "Backup Created"
bin/gpm self-upgrade -y
cd -
chown -R www-data:www-data /opt/grav
msg_ok "Update Successful"
fi
exit
}
start
build_container
description
msg_ok "Completed successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}:80${CL}"
-6
View File
@@ -1,6 +0,0 @@
______
/ ____/________ __ __
/ / __/ ___/ __ `/ | / /
/ /_/ / / / /_/ /| |/ /
\____/_/ \__,_/ |___/
+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
-111
View File
@@ -1,111 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Raffaele (rafspiny)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://getgrav.org/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
nginx \
logrotate
msg_ok "Installed Dependencies"
PHP_FPM="YES" setup_php
fetch_and_deploy_gh_release "grav" "getgrav/grav" "prebuild" "latest" "/opt/grav" "grav-admin-v*zip"
chown -R www-data:www-data /opt/grav
msg_info "Configuring Nginx"
PHP_VER=$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;')
PHP_FPM_SOCK=$(find /run/php -maxdepth 1 -name "php*-fpm.sock" -type s | sort -V | tail -1)
unlink /etc/nginx/sites-enabled/default
rm -f /etc/nginx/sites-available/default
cat <<EOF >/etc/nginx/sites-available/grav
server {
listen 80;
server_name _;
root /opt/grav;
index index.html index.htm index.php;
location / {
try_files \$uri \$uri/ /index.html /index.htm /index.php\$is_args\$args;
}
## Begin - Security
location ~* /(\.git|cache|bin|logs|backup|tests)/.*$ { return 403; }
location ~* /(system|vendor)/.*\.(txt|xml|md|html|json|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
location ~* /user/.*\.(txt|md|json|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
location ~ /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) { return 403; }
## End - Security
## Begin - API
location ^~ /api/ {
try_files \$uri \$uri/ /index.php\$is_args\$args;
}
## End - API
# deny all direct access to these sensitive user folders, whatever the file type
location ~* /user/(accounts|config|env)/.*$ { return 403; }
# allow public media uploads under user/data to be served directly;
# this must come before the user/data deny so it wins the match
location ~* /user/data/.*\.(jpe?g|png|gif|webp|avif|bmp|ico|mp4|webm|ogg|ogv|mov|mp3|wav|m4a|flac|pdf)$ { try_files \$uri =404; }
# deny everything else under user/data
location ~* /user/data/.*$ { return 403; }
## Begin - Caching
location ~* ^/forms-basic-captcha-image.jpg$ {
try_files \$uri \$uri/ /index.php\$is_args\$args;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 30d;
add_header Vary Accept-Encoding;
log_not_found off;
}
location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|woff2|svg)$ {
access_log off;
expires 30d;
add_header Cache-Control public;
tcp_nodelay off;
open_file_cache max=3000 inactive=120s;
open_file_cache_valid 45s;
open_file_cache_min_uses 2;
open_file_cache_errors off;
}
## End - Caching
location ~ ^(.+\.php)(.*)$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
if (!-f \$document_root\$fastcgi_script_name) { return 404; }
fastcgi_pass unix:${PHP_FPM_SOCK};
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
EOF
ln -sf /etc/nginx/sites-available/grav /etc/nginx/sites-enabled/grav
systemctl enable -q --now php${PHP_VER}-fpm
$STD nginx -t
systemctl enable -q --now nginx
$STD nginx -s reload
msg_ok "Configured Nginx"
motd_ssh
customize
cleanup_lxc