[core] New Features for Config File function (#4601)

* New Features for Config File function

* New Features for Config File function
This commit is contained in:
Michel Roegl-Brunner
2025-05-20 11:00:58 +02:00
committed by GitHub
parent 9e8841ea7a
commit 222db46cac
2 changed files with 91 additions and 19 deletions

View File

@@ -363,6 +363,7 @@ base_settings() {
fi
}
write_config() {
mkdir -p /opt/community-scripts
# This function writes the configuration to a file.
if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "Write configfile" --yesno "Do you want to write the selections to a config file?" 10 60; then
FILEPATH="/opt/community-scripts/${NSAPP}.conf"
@@ -800,7 +801,7 @@ advanced_settings() {
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then
echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}"
write_config
else
clear
header_info
@@ -939,7 +940,7 @@ install_script() {
4)
header_info
echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}"
METHOD="advanced"
METHOD="config_file"
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/config-file.func)
config_file
break