From 5f8f57023f98087cff1dd2f5340daf733b5277b0 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 20 May 2025 09:21:56 +0200 Subject: [PATCH 1/4] Config File --- misc/config-file.func | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/misc/config-file.func b/misc/config-file.func index 2f4fe16..54e10fe 100644 --- a/misc/config-file.func +++ b/misc/config-file.func @@ -333,13 +333,8 @@ config_file() { else if [[ -n "${APT_CACHER_IP-}" ]]; then if [[ ! $APT_CACHER_IP == "none" ]]; then - if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then APT_CACHER="yes" echo -e "${NETWORK}${BOLD}${DGN}APT-CACHER IP Address: ${BGN}$APT_CACHER_IP${CL}" - else - msg_error "Invalid IP Address format for APT-Cacher. Needs to be 0.0.0.0, was ${APT_CACHER_IP}" - exit - fi else APT_CACHER="" echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}No${CL}" @@ -497,7 +492,11 @@ config_file() { fi if [[ -n "${TAGS-}" ]]; then - echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" + if [[ "$TAGS" == *"DEFAULT"* ]]; then + TAGS="${TAGS//DEFAULT/}" + TAGS="$TAGS;${var_tags:-}" + echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" + fi else TAGS="community-scripts;" if ADV_TAGS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 "${TAGS}" --title "Advanced Tags" 3>&1 1>&2 2>&3); then From a8bb5347a32fbeda46c93c485fce429dbc16605f Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 20 May 2025 09:24:45 +0200 Subject: [PATCH 2/4] Config File --- misc/config-file.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/config-file.func b/misc/config-file.func index 54e10fe..085f172 100644 --- a/misc/config-file.func +++ b/misc/config-file.func @@ -494,6 +494,7 @@ config_file() { if [[ -n "${TAGS-}" ]]; then if [[ "$TAGS" == *"DEFAULT"* ]]; then TAGS="${TAGS//DEFAULT/}" + TAGS="${TAGS#;}" TAGS="$TAGS;${var_tags:-}" echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" fi From 74bcd30ef338007a5ae52d94adaa62e87e7f7d6a Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 20 May 2025 09:25:32 +0200 Subject: [PATCH 3/4] Config File --- misc/config-file.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/config-file.func b/misc/config-file.func index 085f172..b475717 100644 --- a/misc/config-file.func +++ b/misc/config-file.func @@ -494,7 +494,7 @@ config_file() { if [[ -n "${TAGS-}" ]]; then if [[ "$TAGS" == *"DEFAULT"* ]]; then TAGS="${TAGS//DEFAULT/}" - TAGS="${TAGS#;}" + TAGS="${TAGS//;/}" TAGS="$TAGS;${var_tags:-}" echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" fi From c3420494dd60d43af61b0005ef3d5b642452801c Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 20 May 2025 09:26:50 +0200 Subject: [PATCH 4/4] Config File --- misc/build.func | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/build.func b/misc/build.func index d8b0ee0..165ffd3 100644 --- a/misc/build.func +++ b/misc/build.func @@ -293,6 +293,7 @@ exit_script() { } 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"