mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-26 18:44:44 +00:00
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
This commit is contained in:
@@ -45,16 +45,16 @@ IP=$(ip -4 addr show "$IFACE" | awk '/inet / {print $2}' | cut -d/ -f1 | head -n
|
|||||||
|
|
||||||
# Proxmox Host Warning
|
# Proxmox Host Warning
|
||||||
if [[ -d "/etc/pve" ]]; then
|
if [[ -d "/etc/pve" ]]; then
|
||||||
echo -e "${RD}⚠️ WARNING: You are running this on a Proxmox host!${CL}"
|
echo -e "${RD}⚠️ Warning: Running this addon directly on the Proxmox host is not recommended!${CL}"
|
||||||
echo -e "${YW} The recommended installation method is via LXC:${CL}"
|
echo -e "${YW} Only the boot disk will be visible — passthrough drives will not be indexed.${CL}"
|
||||||
echo -e "${YW} https://community-scripts.github.io/ProxmoxVE/scripts?id=filebrowser-quantum${CL}"
|
echo -e "${YW} This causes incorrect disk usage stats and incomplete file browsing.${CL}"
|
||||||
echo -e "${YW} Installing directly on the host can cause incorrect size calculations${CL}"
|
echo -e "${YW} Please use the dedicated LXC installer instead and mount your drives there:${CL}"
|
||||||
echo -e "${YW} and indexing issues. Proceed at your own risk.${CL}"
|
echo -e "${YW} https://community-scripts.org/scripts/filebrowser-quantum${CL}"
|
||||||
echo ""
|
echo ""
|
||||||
echo -n "Continue installation on the Proxmox host anyway? (y/N): "
|
echo -n "Continue anyway on the Proxmox host? (y/N): "
|
||||||
read -r host_confirm
|
read -r host_confirm
|
||||||
if [[ ! "${host_confirm,,}" =~ ^(y|yes)$ ]]; then
|
if [[ ! "${host_confirm,,}" =~ ^(y|yes)$ ]]; then
|
||||||
echo -e "${YW}Aborted. Please use the LXC installer instead.${CL}"
|
echo -e "${YW}Aborted.${CL}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -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=$(hostname -I | awk '{print $1}')
|
||||||
[[ -z "$IP" ]] && IP="127.0.0.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} Install this addon inside an LXC and mount your drives there instead.${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
|
# Detect OS
|
||||||
if [[ -f "/etc/alpine-release" ]]; then
|
if [[ -f "/etc/alpine-release" ]]; then
|
||||||
OS="Alpine"
|
OS="Alpine"
|
||||||
|
|||||||
Reference in New Issue
Block a user