mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-23 02:15:04 +02:00
Compare commits
3 Commits
fix/node-v
...
fix/filebr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e47df3d2a6 | ||
|
|
d11c409563 | ||
|
|
c850c125ab |
@@ -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=$(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} 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
|
# OS Detection
|
||||||
if [[ -f "/etc/alpine-release" ]]; then
|
if [[ -f "/etc/alpine-release" ]]; then
|
||||||
OS="Alpine"
|
OS="Alpine"
|
||||||
|
|||||||
@@ -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} 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
|
# 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