From 811577a8145e636a73f06873ab07f483b1eaadd4 Mon Sep 17 00:00:00 2001 From: Will Rouesnel Date: Mon, 4 Apr 2016 13:49:54 +1000 Subject: [PATCH] Fix a problem with the env var processing. --- docker-squid/squid.bsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-squid/squid.bsh b/docker-squid/squid.bsh index 564ca37..49fe181 100755 --- a/docker-squid/squid.bsh +++ b/docker-squid/squid.bsh @@ -51,14 +51,16 @@ if [ "$CONFIG_DISABLE" != "yes" ]; then echo '# CACHE PEERS FROM DOCKER' >> /etc/squid4/squid.conf env | grep 'CACHE_PEER' | sort | while read cacheline; do echo "# $cacheline " >> /etc/squid4/squid.conf - echo "cache_peer ${!cacheline}" >> /etc/squid4/squid.conf + line=$(echo $cacheline | cut -d'=' -f2-) + echo "cache_peer $line" >> /etc/squid4/squid.conf done # Parse the extra config lines and append them to the configuration echo '# EXTRA CONFIG FROM DOCKER' >> /etc/squid4/squid.conf env | grep 'EXTRA_CONFIG' | sort | while read extraline; do echo "# $extraline " >> /etc/squid4/squid.conf - echo "${!extraline}" >> /etc/squid4/squid.conf + line=$(echo $extraline | cut -d'=' -f2-) + echo "$line" >> /etc/squid4/squid.conf done else echo "CONFIGURATION TEMPLATING IS DISABLED."