Update build.func
This commit is contained in:
parent
9c92bced11
commit
03dcdfb2fb
@ -998,11 +998,30 @@ install_script() {
|
||||
if systemctl is-active -q ping-instances.service; then
|
||||
systemctl -q stop ping-instances.service
|
||||
fi
|
||||
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
timezone=$(cat /etc/timezone)
|
||||
header_info
|
||||
while true; do
|
||||
|
||||
# --- PRESET support ---
|
||||
if [ -n "${PRESET:-}" ]; then
|
||||
case "$PRESET" in
|
||||
DEFAULT | default | 1)
|
||||
CHOICE="1"
|
||||
;;
|
||||
VERBOSE | verbose | 2)
|
||||
CHOICE="2"
|
||||
;;
|
||||
ADVANCED | advanced | 3)
|
||||
CHOICE="3"
|
||||
;;
|
||||
*)
|
||||
echo -e "\n${CROSS}${RD}Invalid PRESET value: ${PRESET}${CL}\n"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
while true; do
|
||||
TMP_CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" \
|
||||
--title "SETTINGS" \
|
||||
--menu "Choose an option:" 20 60 7 \
|
||||
@ -1021,6 +1040,9 @@ install_script() {
|
||||
fi
|
||||
|
||||
CHOICE="$TMP_CHOICE"
|
||||
break
|
||||
done
|
||||
fi
|
||||
|
||||
case $CHOICE in
|
||||
1)
|
||||
@ -1030,7 +1052,6 @@ install_script() {
|
||||
METHOD="default"
|
||||
base_settings "$VERBOSE"
|
||||
echo_default
|
||||
break
|
||||
;;
|
||||
2)
|
||||
header_info
|
||||
@ -1039,7 +1060,6 @@ install_script() {
|
||||
METHOD="default"
|
||||
base_settings "$VERBOSE"
|
||||
echo_default
|
||||
break
|
||||
;;
|
||||
3)
|
||||
header_info
|
||||
@ -1047,7 +1067,6 @@ install_script() {
|
||||
METHOD="advanced"
|
||||
base_settings
|
||||
advanced_settings
|
||||
break
|
||||
;;
|
||||
4)
|
||||
header_info
|
||||
@ -1055,9 +1074,7 @@ install_script() {
|
||||
METHOD="advanced"
|
||||
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/config-file.func)
|
||||
config_file
|
||||
break
|
||||
;;
|
||||
|
||||
5)
|
||||
manage_default_storage
|
||||
;;
|
||||
@ -1086,7 +1103,6 @@ install_script() {
|
||||
echo -e "${CROSS}${RD}Invalid option, please try again.${CL}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
check_container_resources() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user