Update ubuntu.sh

pull/84/head
tteckster 3 years ago committed by GitHub
parent 9ee7a45518
commit 28cce8d24c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,19 +27,51 @@ ${CL}"
} }
header_info header_info
show_menu(){ show_menu
printf " ${YW} 1)${YW} Privileged ${CL}\n" while [ $opt != '' ]
printf " ${YW} 2)${GN} Unprivileged ${CL}\n" do
if [ $opt = '' ]; then
exit;
else
case $opt in
1) clear;
header_info;
option_picked "Using Privileged Install";
IM=0
break;
;;
2) clear;
header_info;
option_picked "Using Unprivileged Install";
IM=1
break;
;;
printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." x)exit;
;;
\n)exit;
;;
*)clear;
option_picked "Please choose a Install Method from the menu";
show_menu;
;;
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 read opt
} }
option_picked(){ option_picked(){
message=${@:-"${CL}Error: No message passed"} message=${@:-"${CL}Error: No message passed"}
printf " ${YW}${message1}${CL}\n"
printf " ${YW}${message}${CL}\n" printf " ${YW}${message}${CL}\n"
} }
show_menu show_menu2
while [ $opt != '' ] while [ $opt != '' ]
do do
if [ $opt = '' ]; then if [ $opt = '' ]; then
@ -48,14 +80,14 @@ while [ $opt != '' ]
case $opt in case $opt in
1) clear; 1) clear;
header_info; header_info;
option_picked "Using Privileged Install"; option_picked "Using Automatic Login";
IM=0 PW=" "
break; break;
;; ;;
2) clear; 2) clear;
header_info; header_info;
option_picked "Using Unprivileged Install"; option_picked "Using Password (changeme)";
IM=1 PW="-password changeme"
break; break;
;; ;;
@ -64,8 +96,8 @@ while [ $opt != '' ]
\n)exit; \n)exit;
;; ;;
*)clear; *)clear;
option_picked "Please choose a Install Method from the menu"; option_picked "Please choose a Password Type from the menu";
show_menu; show_menu2;
;; ;;
esac esac
fi fi
@ -138,6 +170,7 @@ export PCT_OPTIONS="
-cores 1 -cores 1
-memory 512 -memory 512
-unprivileged ${IM} -unprivileged ${IM}
${PW}
" "
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit

Loading…
Cancel
Save

Powered by BW's shoe-string budget.