浏览代码

Update pve8-post-install.sh

tteckster 2 年之前
父节点
当前提交
9d7170d7a2
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15 0
      misc/pve8-post-install.sh

+ 15 - 0
misc/pve8-post-install.sh

@@ -192,4 +192,19 @@ while true; do
   esac
   esac
 done
 done
 
 
+if ! command -v pveversion >/dev/null 2>&1; then
+  header_info
+  msg_error "\n No PVE Detected!\n"
+  exit
+fi
+
+if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then
+  header_info
+  msg_error "This version of Proxmox Virtual Environment is not supported"
+  echo -e "  Requires PVE Version: 8.XX"
+  echo -e "\nExiting..."
+  sleep 3
+  exit
+fi
+
 start_routines
 start_routines