Update build.func

This commit is contained in:
CanbiZ 2024-12-09 09:36:00 +01:00
parent d10c404b60
commit 03301f12d2

View File

@ -587,17 +587,47 @@ install_script() {
NEXTID=$(pvesh get /cluster/nextid) NEXTID=$(pvesh get /cluster/nextid)
timezone=$(cat /etc/timezone) timezone=$(cat /etc/timezone)
header_info header_info
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then while true; do
header_info CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings${CL}" 15 60 4 \
base_settings "1" "Yes" \
echo_default "2" "Yes (with verbose)" \
else "3" "Advanced Settings" \
header_info "4" "Exit" 3>&1 1>&2 2>&3)
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
advanced_settings case $CHOICE in
fi 1)
} header_info
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings${CL}"
VERBOSE="no"
base_settings
echo_default
break
;;
2)
header_info
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings (Verbose)${CL}"
VERBOSE="yes"
base_settings
echo_default
break
;;
3)
header_info
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
advanced_settings
break
;;
4)
echo -e "${CROSS}${RD} Exiting.${CL}"
exit 0
;;
*)
echo -e "${CROSS}${RD} Invalid option, please try again.${CL}"
;;
esac
done
check_container_resources() { check_container_resources() {
# Check actual RAM & Cores # Check actual RAM & Cores