Skip to content

Commit e02c0dd

Browse files
committed
Fixed generation of resolvers.conf when IPv6 is involved.
1 parent 1206f8d commit e02c0dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rootfs/etc/cont-init.d/nginx-proxy-manager.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ then
144144
fi
145145

146146
# Generate the resolvers configuration file.
147-
echo resolver $(awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf) ";" > /config/nginx/resolvers.conf
147+
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" > /config/nginx/resolvers.conf
148148

149149
# Take ownership of the config directory content.
150150
find /config -mindepth 1 -exec chown $USER_ID:$GROUP_ID {} \;

0 commit comments

Comments
 (0)