From 282413951068c7dd0dfee8a76b18c20e5688f555 Mon Sep 17 00:00:00 2001 From: Erik Hollensbe Date: Tue, 1 Jun 2021 09:27:05 -0700 Subject: [PATCH] Small dockerfile release fixes - Activate zerotier-one.port file (we'll do more with this later) - Add a better process trap Signed-off-by: Erik Hollensbe --- entrypoint.sh.release | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/entrypoint.sh.release b/entrypoint.sh.release index 1683ad4c4..92c57be7c 100644 --- a/entrypoint.sh.release +++ b/entrypoint.sh.release @@ -30,6 +30,16 @@ then mkztfile identity.secret 0600 "$ZEROTIER_IDENTITY_SECRET" fi +mkztfile zerotier-one.port 0600 "9993" + +killzerotier() { + echo "Killing zerotier" + kill $(cat /var/lib/zerotier-one/zerotier-one.pid) + exit 0 +} + +trap killzerotier INT TERM + echo "starting zerotier" setsid /usr/sbin/zerotier-one &