Explorar o código

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 <[email protected]>
Erik Hollensbe %!s(int64=4) %!d(string=hai) anos
pai
achega
2824139510
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      entrypoint.sh.release

+ 10 - 0
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 &