Skip to content

Commit b326528

Browse files
antonymrjocoleman
authored andcommitted
Limit envsub to only variable being changed
1 parent f36963f commit b326528

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

root/init.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ mkdir -p \
1313
# copy config files
1414
[[ ! -f /config/nginx/nginx.conf ]] &&
1515
cp /defaults/nginx.conf /config/nginx/nginx.conf
16-
[[ ! -f /config/nginx/site-confs/default ]] &&
17-
envsubst </defaults/default >/config/nginx/site-confs/default
16+
[[ ! -f /config/nginx/site-confs/default ]] && \
17+
envsubst '${NGINX_PORT}' < /defaults/default > /config/nginx/site-confs/default
1818

1919
# create dnsmasq config, and conditionally add DHCP proxy support
2020
if [[ ! -f /config/dnsmasq/dnsmasq.conf ]]; then
@@ -28,7 +28,7 @@ if [[ ! -f /config/dnsmasq/dnsmasq.conf ]]; then
2828
CONTAINER_IP=$(hostname -i)
2929
export CONTAINER_IP
3030
fi
31-
envsubst </defaults/dnsmasq-dhcpproxy.conf >>/config/dnsmasq/dnsmasq.conf
31+
envsubst '${DHCP_RANGE_START} ${CONTAINER_IP}' </defaults/dnsmasq-dhcpproxy.conf >>/config/dnsmasq/dnsmasq.conf
3232
fi
3333
fi
3434

0 commit comments

Comments
 (0)