From c850c125ab6dd6a6b9a3845c2829f8bcc7c17c4b Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:14:40 +0200 Subject: [PATCH] fix(filebrowser-quantum): warn when addon is run directly on Proxmox host Detect /etc/pve and show a clear warning with link to the recommended LXC installer. User must explicitly confirm to continue on the host, addressing the size calculation and indexing issues reported in gtsteffaniak/filebrowser#1893. Closes #13636 --- tools/addon/filebrowser-quantum.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/addon/filebrowser-quantum.sh b/tools/addon/filebrowser-quantum.sh index 9f50e5f4c..8b5203d41 100644 --- a/tools/addon/filebrowser-quantum.sh +++ b/tools/addon/filebrowser-quantum.sh @@ -43,6 +43,22 @@ IP=$(ip -4 addr show "$IFACE" | awk '/inet / {print $2}' | cut -d/ -f1 | head -n [[ -z "$IP" ]] && IP=$(hostname -I | awk '{print $1}') [[ -z "$IP" ]] && IP="127.0.0.1" +# Proxmox Host Warning +if [[ -d "/etc/pve" ]]; then + echo -e "${RD}⚠️ WARNING: You are running this on a Proxmox host!${CL}" + echo -e "${YW} The recommended installation method is via LXC:${CL}" + echo -e "${YW} https://community-scripts.github.io/ProxmoxVE/scripts?id=filebrowser-quantum${CL}" + echo -e "${YW} Installing directly on the host can cause incorrect size calculations${CL}" + echo -e "${YW} and indexing issues. Proceed at your own risk.${CL}" + echo "" + echo -n "Continue installation on the Proxmox host anyway? (y/N): " + read -r host_confirm + if [[ ! "${host_confirm,,}" =~ ^(y|yes)$ ]]; then + echo -e "${YW}Aborted. Please use the LXC installer instead.${CL}" + exit 0 + fi +fi + # OS Detection if [[ -f "/etc/alpine-release" ]]; then OS="Alpine"