mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-25 11:11:02 +00:00
fix: removing ",gw=" from GATE variable when reading/writing from/to config. (#6177)
Previously when creating a config, GATE variable would incluse ",gw=" which was crashing the installer script when read later on. This fix: 1. writes GATE variable to config without ",gw=" 2. removes ",gw=" from GATE variable when reading existing config Co-authored-by: teohz <git@teohz.com>
This commit is contained in:
@@ -249,6 +249,7 @@ write_config() {
|
||||
# This function writes the configuration to a file.
|
||||
if whiptail --backtitle "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"
|
||||
[[ "$GATE" =~ ",gw=" ]] && local GATE="${GATE##,gw=}"
|
||||
if [[ ! -f $FILEPATH ]]; then
|
||||
cat <<EOF >"$FILEPATH"
|
||||
# ${NSAPP} Configuration File
|
||||
|
Reference in New Issue
Block a user