We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2bb27a commit 8126520Copy full SHA for 8126520
target/unbound/rootfs/usr/local/bin/healthcheck.sh
@@ -1,14 +1,15 @@
1
#!/bin/sh
2
set -e
3
4
-# 1. test connection to 0.0.0.0:53 (UDP via dig) and TCP via nc
+# UDP check
5
if ! dig @127.0.0.1 -p 53 github.com +time=2 +tries=1 +short >/dev/null 2>&1; then
6
- echo "Healthcheck failed: dig to 127.0.0.1:53"
+ echo "Healthcheck failed: dig UDP to 127.0.0.1:53"
7
exit 1
8
fi
9
10
-if ! nc -z 0.0.0.0 53; then
11
- echo "Healthcheck failed: cannot connect to 0.0.0.0:53 (TCP)"
+# TCP check (no nc dependency)
+if ! dig +tcp @127.0.0.1 -p 53 github.com +time=2 +tries=1 +short >/dev/null 2>&1; then
12
+ echo "Healthcheck failed: dig TCP to 127.0.0.1:53"
13
14
15
0 commit comments