From b326528269eb1cf9aae218af328760f3d40e0893 Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Mon, 30 Dec 2024 12:49:45 -0600 Subject: [PATCH] Limit envsub to only variable being changed --- root/init.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/root/init.sh b/root/init.sh index addff58..abad4a1 100755 --- a/root/init.sh +++ b/root/init.sh @@ -13,8 +13,8 @@ mkdir -p \ # copy config files [[ ! -f /config/nginx/nginx.conf ]] && cp /defaults/nginx.conf /config/nginx/nginx.conf -[[ ! -f /config/nginx/site-confs/default ]] && - envsubst /config/nginx/site-confs/default +[[ ! -f /config/nginx/site-confs/default ]] && \ + envsubst '${NGINX_PORT}' < /defaults/default > /config/nginx/site-confs/default # create dnsmasq config, and conditionally add DHCP proxy support if [[ ! -f /config/dnsmasq/dnsmasq.conf ]]; then @@ -28,7 +28,7 @@ if [[ ! -f /config/dnsmasq/dnsmasq.conf ]]; then CONTAINER_IP=$(hostname -i) export CONTAINER_IP fi - envsubst >/config/dnsmasq/dnsmasq.conf + envsubst '${DHCP_RANGE_START} ${CONTAINER_IP}' >/config/dnsmasq/dnsmasq.conf fi fi