mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-06-30 22:05:46 +00:00
Add dynamically-computed DNS resolvers to nginx (for PR #574)
This commit is contained in:
committed by
Teoh Han Hui
parent
6bdd184d6a
commit
0cc71fad49
@ -18,6 +18,12 @@ fi
|
||||
# Note: if $DHPARAM_BITS is not defined, generate-dhparam.sh will use 2048 as a default
|
||||
/app/generate-dhparam.sh $DHPARAM_BITS
|
||||
|
||||
# Compute the DNS resolvers for use in the templates
|
||||
export RESOLVERS=$(awk '$1 == "nameserver" {print $2}' ORS=' ' /etc/resolv.conf | sed 's/ *$//g')
|
||||
if [ "x$RESOLVERS" = "x" ]; then
|
||||
echo "Warning: unable to determine DNS resolvers for nginx" >&2
|
||||
fi
|
||||
|
||||
# If the user has run the default command and the socket doesn't exist, fail
|
||||
if [ "$socketMissing" = 1 -a "$1" = forego -a "$2" = start -a "$3" = '-r' ]; then
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user