Update build.func

This commit is contained in:
CanbiZ 2025-04-28 09:57:31 +02:00
parent 9021c2beba
commit dc2d5ce8a0

View File

@ -943,10 +943,10 @@ install_script() {
CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \ CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \
18 60 6 \ 18 60 6 \
"1" "Default Settings" \ "1" "Default Settings" \
"2" "Default Settings (with output)" \ "2" "Default Settings (with verbose)" \
"3" "Advanced Settings" \ "3" "Advanced Settings" \
"4" "Diagnostic Settings" \ "4" "Use Config File" \
"5" "Use Config File" \ "5" "Diagnostic Settings" \
"6" "Exit" --nocancel --default-item "1" 3>&1 1>&2 2>&3) "6" "Exit" --nocancel --default-item "1" 3>&1 1>&2 2>&3)
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -982,6 +982,14 @@ install_script() {
break break
;; ;;
4) 4)
header_info
echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}"
METHOD="advanced"
base_settings
config_file
break
;;
5)
if [[ $DIAGNOSTICS == "yes" ]]; then if [[ $DIAGNOSTICS == "yes" ]]; then
if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \
--yes-button "No" --no-button "Back"; then --yes-button "No" --no-button "Back"; then
@ -998,12 +1006,6 @@ install_script() {
fi fi
fi fi
;;
5)
header_info
echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}"
config_file
break
;; ;;
6) 6)
echo -e "${CROSS}${RD}Exiting.${CL}" echo -e "${CROSS}${RD}Exiting.${CL}"
@ -1350,6 +1352,23 @@ EOF
post_update_to_api "done" "none" post_update_to_api "done" "none"
} }
set_std_mode() {
if [ "$VERB" = "yes" ]; then
STD=""
else
STD="silent"
fi
}
# Silent execution function
silent() {
if [ "$VERB" = "no" ]; then
"$@" >>"$LOGFILE" 2>&1
else
"$@" 2>&1 | tee -a "$LOGFILE"
fi
}
# Silent execution function # Silent execution function
# 26.03.2025 disabled # 26.03.2025 disabled