소스 검색

Update build.func

ssh_check
tteckster 2 년 전
부모
커밋
10ecbb856b
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      misc/build.func

+ 12 - 0
misc/build.func

@@ -65,6 +65,18 @@ arch_check() {
   fi
   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() {
 echo_default() {
   if [ "$var_os" == "ubuntu" ]; then
   if [ "$var_os" == "ubuntu" ]; then
     echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}"
     echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}"