Skip to content

Commit

Permalink
Merge pull request #3 from nlnwa/fix_stats
Browse files Browse the repository at this point in the history
Fix DNS_SERVERS param was ignored
  • Loading branch information
maeb authored Oct 18, 2018
2 parents 58fca05 + deb5d86 commit d591358
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SQUID_VERSION=$(/usr/sbin/squid -v | grep Version | awk '{ print $4 }')
if [ "$1" == "squid" ]; then
echo "Staring squid [${SQUID_VERSION}]"

sudo /init-squid.sh
sudo /init-squid.sh $DNS_SERVERS
/usr/sbin/squid -N -z
exec /usr/sbin/squid -NYC
else
Expand Down
2 changes: 1 addition & 1 deletion init-squid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
# ----------------------------------------------------------------------------
set -e

DNS_SERVERS=$1
if [ -n "$DNS_SERVERS" ]; then
for s in $DNS_SERVERS; do
export DNS_IP="$(nslookup ${s} | grep "Address 1" | cut -f3 -d' ') ${DNS_IP}"
done
env
fi
/usr/bin/envsubst '${DNS_IP}' < /etc/squid/squid.conf.template > /etc/squid/squid.conf
/bin/chown -R squid:squid /var/cache/squid
Expand Down

0 comments on commit d591358

Please sign in to comment.