diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index fff4f939..ceb9f0d8 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -33,7 +33,7 @@ GN=$(echo "\033[1;92m") DGN=$(echo "\033[32m") CL=$(echo "\033[m") BFR="\\r\\033[K" -HOLD="-" +HOLD=" " CM="${GN}✓${CL}" CROSS="${RD}✗${CL}" THIN="discard=on,ssd=1," @@ -74,13 +74,13 @@ else fi function spinner() { - printf "\e[?25l" - spinner="◐◓◑◒" - spin_i=0 - while true; do - printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" - sleep 0.1 - done + local chars="/-\|" + local spin_i=0 + printf "\e[?25l" + while true; do + printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}" + sleep 0.1 + done } function msg_info() { @@ -396,6 +396,8 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else while [ -z "${STORAGE:+x}" ]; do + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + printf "\e[?25h" STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \