From da7b78eae3a2b3d860e13a280826144f9b702ef5 Mon Sep 17 00:00:00 2001 From: pedro Date: Fri, 8 Nov 2024 18:20:47 +0100 Subject: [PATCH] pxe: .env generated once from example file --- pxe/install-pxe.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pxe/install-pxe.sh b/pxe/install-pxe.sh index bf85630..1d71e52 100755 --- a/pxe/install-pxe.sh +++ b/pxe/install-pxe.sh @@ -132,11 +132,10 @@ init_config() { PXE_DIR="$(pwd)" - if [ -f ./.env ]; then - . ./.env - else - echo "PXE: WARNING: $(pwd)/.env does not exist yet, cannot read config from there. You can take inspiration with file $(pwd)/.env.example" + if [ ! -f ./.env ]; then + echo "WARNING: .env was not there, .env.example was copied, this only happens once" fi + . ./.env VERSION_CODENAME="${VERSION_CODENAME:-bookworm}" tftp_path="${tftp_path:-/srv/pxe-tftp}" # vars used in envsubst require to be exported: