entrypoint.sh 589 B

12345678910111213141516
  1. echo '*** ZeroTier-Kubernetes self-auth test script'
  2. chown -R daemon /var/lib/zerotier-one
  3. chgrp -R daemon /var/lib/zerotier-one
  4. su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1'
  5. virtip4=""
  6. while [ -z "$virtip4" ]; do
  7. sleep 0.2
  8. virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1`
  9. done
  10. echo '*** Up and running at' $virtip4 ' on network: ' $nwid
  11. echo '*** Self-Authorizing to deployment network'
  12. ./zerotier-cli join $(NWID).conf
  13. ./zerotier-cli net-auth $(NWID) $(DEVID)
  14. # node server.js