From f0b6d81fa3fcbc196a17fd12e60d38d67c9b2ac2 Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Fri, 21 Dec 2018 14:15:09 +0100 Subject: [PATCH] feat: keep alive with tail -f --- entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index d75ce9e..ac9457b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -14,5 +14,7 @@ FORWARDING_PORTS=${PORTS:-'0:65535'} iptables -t nat -I PREROUTING -p tcp --match multiport --dports "$FORWARDING_PORTS" -j DNAT --to-destination $DOCKER_HOST iptables -t nat -I POSTROUTING -j MASQUERADE +trap "exit 0;" TERM INT + # Ah, ha, ha, ha, stayin' alive... -trap "exit 0;" TERM INT; while true; do sleep 1d; done & wait +mkfifo void; tail -f void & wait