Update entrypoint.sh
Browse files- entrypoint.sh +2 -9
entrypoint.sh
CHANGED
|
@@ -4,7 +4,7 @@ set -eu
|
|
| 4 |
echo "== DNS before =="
|
| 5 |
cat /etc/resolv.conf || true
|
| 6 |
|
| 7 |
-
# Try to set resolv.conf (may be overwritten/blocked
|
| 8 |
if [ -w /etc/resolv.conf ]; then
|
| 9 |
printf "nameserver 1.1.1.1\nnameserver 8.8.8.8\noptions timeout:2 attempts:2\n" > /etc/resolv.conf || true
|
| 10 |
fi
|
|
@@ -12,16 +12,9 @@ fi
|
|
| 12 |
echo "== DNS after =="
|
| 13 |
cat /etc/resolv.conf || true
|
| 14 |
|
|
|
|
| 15 |
echo "== DNS test =="
|
| 16 |
getent hosts graph.facebook.com || true
|
| 17 |
-
getent hosts graph-video.facebook.com || true
|
| 18 |
-
|
| 19 |
-
echo "== TLS test (graph.facebook.com, TLS1.2) =="
|
| 20 |
-
date || true
|
| 21 |
-
timeout 12 openssl s_client -connect graph.facebook.com:443 -servername graph.facebook.com -tls1_2 </dev/null || true
|
| 22 |
-
|
| 23 |
-
echo "== TLS test (graph-video.facebook.com, TLS1.2) =="
|
| 24 |
-
timeout 12 openssl s_client -connect graph-video.facebook.com:443 -servername graph-video.facebook.com -tls1_2 </dev/null || true
|
| 25 |
|
| 26 |
# Drop privileges and run n8n as node
|
| 27 |
exec su-exec node "$@"
|
|
|
|
| 4 |
echo "== DNS before =="
|
| 5 |
cat /etc/resolv.conf || true
|
| 6 |
|
| 7 |
+
# Try to set resolv.conf (may be overwritten/blocked by the platform/Docker)
|
| 8 |
if [ -w /etc/resolv.conf ]; then
|
| 9 |
printf "nameserver 1.1.1.1\nnameserver 8.8.8.8\noptions timeout:2 attempts:2\n" > /etc/resolv.conf || true
|
| 10 |
fi
|
|
|
|
| 12 |
echo "== DNS after =="
|
| 13 |
cat /etc/resolv.conf || true
|
| 14 |
|
| 15 |
+
# Quick smoke test (won't fail container start if blocked)
|
| 16 |
echo "== DNS test =="
|
| 17 |
getent hosts graph.facebook.com || true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
# Drop privileges and run n8n as node
|
| 20 |
exec su-exec node "$@"
|