From 4cb7fa4bde3155ada9feb14e15b72ee9d5e79b89 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 26 Apr 2022 08:30:17 -0400 Subject: [PATCH] Update haos_vm.sh --- vm/haos_vm.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/vm/haos_vm.sh b/vm/haos_vm.sh index 0eaadb8d..41d93514 100644 --- a/vm/haos_vm.sh +++ b/vm/haos_vm.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash NEXTID=$(pvesh get /cluster/nextid) +RELEASE="7.6" YW=`echo "\033[33m"` BL=`echo "\033[36m"` RD=`echo "\033[01;31m"` @@ -12,7 +13,7 @@ HOLD="-" CM="${GN}✓${CL}" while true; do - read -p "This will create a New Home Assistant OS VM. Proceed(y/n)?" yn + read -p "This will create a New ${RELEASE} Home Assistant OS VM. Proceed(y/n)?" yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; @@ -48,8 +49,8 @@ function default_settings() { echo -e "${BL}Using Default Settings${CL}" echo -e "${DGN}Using VM ID ${BGN}$NEXTID${CL}" VMID=$NEXTID - echo -e "${DGN}Using VM Name ${BGN}haos${CL}" - VM_NAME=haos + echo -e "${DGN}Using VM Name ${BGN}haos${RELEASE}${CL}" + VM_NAME=haos${RELEASE} echo -e "${DGN}Using ${BGN}2vCPU${CL}" CORE_COUNT="2" echo -e "${DGN}Using ${BGN}4096MiB${CL}" @@ -72,10 +73,10 @@ clear header_info echo -e "${RD}Using Advanced Settings${CL}" echo -e "${DGN}Using VM ID ${BGN}$VMID${CL}" - echo -e "${YW}Enter VM Name (no-spaces), or Press [ENTER] for Default: hoas " + echo -e "${YW}Enter VM Name (no-spaces), or Press [ENTER] for Default: haos${RELEASE} " read VMNAME if [ -z $VMNAME ]; then - VM_NAME=haos + VM_NAME=haos${RELEASE} else VM_NAME=$(echo ${VMNAME,,} | tr -d ' ') fi @@ -219,14 +220,14 @@ else fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Container ID is ${CL}${BL}$VMID${CL}." -msg_info "Getting URL for Latest Home Assistant Disk Image" -URL="https://github.com/home-assistant/operating-system/releases/download/7.6/haos_ova-7.6.qcow2.xz" +msg_info "Getting URL for Stable Branch Home Assistant Disk Image" +URL=https://github.com/home-assistant/operating-system/releases/download/${RELEASE}/haos_ova-${RELEASE}.qcow2.xz msg_ok "Found URL for Latest Home Assistant Disk Image" msg_ok "${CL}${BL}${URL}${CL}" wget -q --show-progress $URL echo -en "\e[1A\e[0K" FILE=$(basename $URL) -msg_ok "Downloaded ${CL}${BL}qcow2${CL}${GN} Disk Image" +msg_ok "Downloaded ${CL}${BL}${RELEASE}.qcow2${CL}${GN} Disk Image" msg_info "Extracting Disk Image" unxz $FILE STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')