Skip to content

Commit 5e86527

Browse files
authored
addons: Filebrowser & Filebrowser-Quantum get warning if host install (#13639)
* 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 * fix(filebrowser): improve host warning text and add to filebrowser addon - Clarify that passthrough drives are not visible on the Proxmox host - Mention incorrect disk usage stats and incomplete file browsing - Add same warning to filebrowser (non-quantum) addon which also serves from / - Reduce verbosity, remove redundant phrasing * fix(filebrowser): fix misleading host warning wording Remove reference to a non-existent dedicated LXC installer. The addons should simply be run inside an LXC or VM instead.
1 parent a18642a commit 5e86527

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

tools/addon/filebrowser-quantum.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,21 @@ IP=$(ip -4 addr show "$IFACE" | awk '/inet / {print $2}' | cut -d/ -f1 | head -n
4343
[[ -z "$IP" ]] && IP=$(hostname -I | awk '{print $1}')
4444
[[ -z "$IP" ]] && IP="127.0.0.1"
4545

46+
# Proxmox Host Warning
47+
if [[ -d "/etc/pve" ]]; then
48+
echo -e "${RD}⚠️ Warning: Running this addon directly on the Proxmox host is not recommended!${CL}"
49+
echo -e "${YW} Only the boot disk will be visible — passthrough drives will not be indexed.${CL}"
50+
echo -e "${YW} This causes incorrect disk usage stats and incomplete file browsing.${CL}"
51+
echo -e "${YW} Run this addon inside an LXC or VM instead and mount your drives there.${CL}"
52+
echo ""
53+
echo -n "Continue anyway on the Proxmox host? (y/N): "
54+
read -r host_confirm
55+
if [[ ! "${host_confirm,,}" =~ ^(y|yes)$ ]]; then
56+
echo -e "${YW}Aborted.${CL}"
57+
exit 0
58+
fi
59+
fi
60+
4661
# OS Detection
4762
if [[ -f "/etc/alpine-release" ]]; then
4863
OS="Alpine"

tools/addon/filebrowser.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,21 @@ IP=$(ip -4 addr show "$IFACE" | awk '/inet / {print $2}' | cut -d/ -f1 | head -n
4141
[[ -z "$IP" ]] && IP=$(hostname -I | awk '{print $1}')
4242
[[ -z "$IP" ]] && IP="127.0.0.1"
4343

44+
# Proxmox Host Warning
45+
if [[ -d "/etc/pve" ]]; then
46+
echo -e "${RD}⚠️ Warning: Running this addon directly on the Proxmox host is not recommended!${CL}"
47+
echo -e "${YW} Only the boot disk will be visible — passthrough drives will not be indexed.${CL}"
48+
echo -e "${YW} This causes incorrect disk usage stats and incomplete file browsing.${CL}"
49+
echo -e "${YW} Run this addon inside an LXC or VM instead and mount your drives there.${CL}"
50+
echo ""
51+
echo -n "Continue anyway on the Proxmox host? (y/N): "
52+
read -r host_confirm
53+
if [[ ! "${host_confirm,,}" =~ ^(y|yes)$ ]]; then
54+
echo -e "${YW}Aborted.${CL}"
55+
exit 0
56+
fi
57+
fi
58+
4459
# Detect OS
4560
if [[ -f "/etc/alpine-release" ]]; then
4661
OS="Alpine"

0 commit comments

Comments
 (0)