From 10ecbb856b4599ebcb0c029efc51783c84efda03 Mon Sep 17 00:00:00 2001
From: tteckster <tteckster@gmail.com>
Date: Sun, 26 Mar 2023 11:06:28 -0400
Subject: [PATCH] Update build.func

ssh_check
---
 misc/build.func | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/misc/build.func b/misc/build.func
index 7de773bd..53000673 100644
--- a/misc/build.func
+++ b/misc/build.func
@@ -65,6 +65,18 @@ arch_check() {
   fi
 }
 
+ssh_check() {
+if command -v pveversion >/dev/null 2>&1; then
+  if [ -n "$SSH_CLIENT" ]; then
+    if whiptail --defaultno --title "SSH DETECTED" --yesno "The scripts suggest using the Proxmox shell instead of SSH, since the latter can create issues while gathering variables. Would you like to proceed with using SSH?" 10 68; then
+      echo "you've been warned"
+    else
+      exit
+    fi  
+  fi
+fi
+}
+
 echo_default() {
   if [ "$var_os" == "ubuntu" ]; then
     echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}"