From ca997e7ba841adaf88ce686f1ff0a6edf7371001 Mon Sep 17 00:00:00 2001
From: tteckster <tteckster@gmail.com>
Date: Thu, 14 Apr 2022 16:20:56 -0400
Subject: [PATCH] Update homeassistant-v3.sh

---
 ct/homeassistant-v3.sh | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/ct/homeassistant-v3.sh b/ct/homeassistant-v3.sh
index 22c65528..6c18f194 100644
--- a/ct/homeassistant-v3.sh
+++ b/ct/homeassistant-v3.sh
@@ -10,7 +10,7 @@ GN=`echo "\033[32m"`
 CL=`echo "\033[m"`
 APP="Home Assistant"
 NSAPP=$(echo ${APP,,} | tr -d ' ')
-
+PVE=$(pveversion | grep "pve-manager/7" | wc -l)
 while true; do
     read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn
     case $yn in
@@ -33,14 +33,12 @@ ${CL}"
 
 header_info
 
-function pve_7() {
-if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then
-        echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater"
+if [[ $PVE != 1 ]]; then
+        echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}"
         echo -e "Exiting..."
         sleep 2
         exit
 fi
-}
 
 function default_settings() {
                 clear
@@ -260,7 +258,7 @@ function start_script() {
 		advanced_settings 
 		fi;
 }
-pve_7
+
 start_script
 
 set -o errexit