Skip unresolvable domains in firewall allowlist instead of aborting
If DNS resolution transiently fails for one domain, the whole postStart hook used to exit 1 and leave the container without a firewall. Warn and continue so the remaining rules still get installed.
This commit is contained in:
parent
3077b2d669
commit
eba81400a8
1 changed files with 2 additions and 2 deletions
|
|
@ -74,8 +74,8 @@ for domain in \
|
|||
echo "Resolving $domain..."
|
||||
ips=$(dig +noall +answer A "$domain" | awk '$4 == "A" {print $5}')
|
||||
if [ -z "$ips" ]; then
|
||||
echo "ERROR: Failed to resolve $domain"
|
||||
exit 1
|
||||
echo "WARN: Failed to resolve $domain - skipping"
|
||||
continue
|
||||
fi
|
||||
|
||||
while read -r ip; do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue