pxe: .env generated once from example file

This commit is contained in:
pedro 2024-11-08 18:20:47 +01:00
parent e8b1d62290
commit da7b78eae3
1 changed files with 3 additions and 4 deletions

View File

@ -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: