diff --git a/tools/addon/filebrowser-quantum.sh b/tools/addon/filebrowser-quantum.sh index 9f50e5f4c..66fdb3455 100644 --- a/tools/addon/filebrowser-quantum.sh +++ b/tools/addon/filebrowser-quantum.sh @@ -43,6 +43,21 @@ 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: Running this addon directly on the Proxmox host is not recommended!${CL}" + echo -e "${YW} Only the boot disk will be visible — passthrough drives will not be indexed.${CL}" + echo -e "${YW} This causes incorrect disk usage stats and incomplete file browsing.${CL}" + echo -e "${YW} Run this addon inside an LXC or VM instead and mount your drives there.${CL}" + echo "" + echo -n "Continue anyway on the Proxmox host? (y/N): " + read -r host_confirm + if [[ ! "${host_confirm,,}" =~ ^(y|yes)$ ]]; then + echo -e "${YW}Aborted.${CL}" + exit 0 + fi +fi + # OS Detection if [[ -f "/etc/alpine-release" ]]; then OS="Alpine" diff --git a/tools/addon/filebrowser.sh b/tools/addon/filebrowser.sh index 93ad3db64..a7db5f122 100644 --- a/tools/addon/filebrowser.sh +++ b/tools/addon/filebrowser.sh @@ -41,6 +41,21 @@ 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: Running this addon directly on the Proxmox host is not recommended!${CL}" + echo -e "${YW} Only the boot disk will be visible — passthrough drives will not be indexed.${CL}" + echo -e "${YW} This causes incorrect disk usage stats and incomplete file browsing.${CL}" + echo -e "${YW} Run this addon inside an LXC or VM instead and mount your drives there.${CL}" + echo "" + echo -n "Continue anyway on the Proxmox host? (y/N): " + read -r host_confirm + if [[ ! "${host_confirm,,}" =~ ^(y|yes)$ ]]; then + echo -e "${YW}Aborted.${CL}" + exit 0 + fi +fi + # Detect OS if [[ -f "/etc/alpine-release" ]]; then OS="Alpine"