From 4ad44e709583d12a788def9ec63b2242bd049c45 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 8 Mar 2022 10:35:43 -0500 Subject: [PATCH] Update dashy.sh --- ct/dashy.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/ct/dashy.sh b/ct/dashy.sh index 25cab4a1..0e5dd77a 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -38,8 +38,8 @@ show_menu(){ } option_picked(){ - message=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message}${CL}\n" + message1=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" } show_menu while [ $opt != '' ] @@ -72,6 +72,50 @@ while [ $opt != '' ] esac fi done +show_menu2(){ + printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" + printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" + + printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message}${CL}\n" +} +show_menu2 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic Login"; + PW=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Password (changeme)"; + PW="-password changeme" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a Password Type from the menu"; + show_menu2; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -140,6 +184,7 @@ export PCT_OPTIONS=" -cores 2 -memory 2048 -unprivileged ${IM} + ${PW} " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit