From b3a6f29bc2aa678a26785e29b78b9a776b02aeb7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 20 Dec 2023 04:12:13 -0500 Subject: [PATCH] Update netdata.sh tweak --- misc/netdata.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/misc/netdata.sh b/misc/netdata.sh index 01fd787f..67c6646e 100644 --- a/misc/netdata.sh +++ b/misc/netdata.sh @@ -17,7 +17,7 @@ EOF install() { while true; do - read -p "This script will install NetData on Proxmox VE. Proceed(y/n)?" yn + read -p "This script will install NetData on Proxmox VE 8+. Proceed(y/n)?" yn case $yn in [Yy]*) break ;; [Nn]*) exit ;; @@ -45,16 +45,17 @@ userdel netdata echo -e "\nRemoved NetData from Proxmox VE\n" } -if ! command -v pveversion >/dev/null 2>&1; then - clear - echo -e "\n No PVE Detected!\n" +if ! pveversion | grep -Eq "pve-manager/(8\.[0-9])"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 8.0 or higher" + echo -e "Exiting..." + sleep 2 exit fi OPTIONS=(Install "Install NetData on Proxmox VE" \ Uninstall "Uninstall NetData from Proxmox VE") -# Show the whiptail menu and save the user's choice CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "NetData" --menu "Select an option:" 10 58 2 \ "${OPTIONS[@]}" 3>&1 1>&2 2>&3)