Skip to content

Commit

Permalink
Merge pull request #98 from lancachenet/97-upstream-dns-compatibility
Browse files Browse the repository at this point in the history
Fix #97 - Replace semicolons in UPSTREAM_DNS
  • Loading branch information
VibroAxe authored Mar 23, 2020
2 parents a355a88 + a4e98fb commit 149da88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions overlay/hooks/entrypoint-pre.d/10_setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/sh
set -e

# Preprocess UPSTREAM_DNS to allow for multiple resolvers using the same syntax as lancache-dns
UPSTREAM_DNS="$(echo -n "${UPSTREAM_DNS}" | sed 's/[;]/ /g')"

echo "worker_processes ${NGINX_WORKER_PROCESSES};" > /etc/nginx/workers.conf
sed -i "s/^user .*/user ${WEBUSER};/" /etc/nginx/nginx.conf
sed -i "s/CACHE_MEM_SIZE/${CACHE_MEM_SIZE}/" /etc/nginx/conf.d/20_proxy_cache_path.conf
Expand Down

0 comments on commit 149da88

Please sign in to comment.