Skip to content

Instantly share code, notes, and snippets.

@wcameronbowen
Forked from solarmicrobe/add_zerotier.sh
Last active October 5, 2020 02:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wcameronbowen/51ccc909cbad2c3335c5ab8c43e3d5e1 to your computer and use it in GitHub Desktop.
Save wcameronbowen/51ccc909cbad2c3335c5ab8c43e3d5e1 to your computer and use it in GitHub Desktop.
Add zerotier to FreeNAS
#! /usr/bin/env sh
NETWORKS="8056c2e21c000001" # Space seperated list of networks to join, default here is the public network Earth
VERSION=1.4.6
wget http://pkg.freebsd.org/freebsd:12:x86:64/latest/All/zerotier-${VERSION}.txz -O /tmp/zerotier-${VERSION}.txz
pkg add -f /tmp/zerotier-${VERSION}.txz
echo 'zerotier_enable="YES"' >> /etc/rc.conf
service zerotier start
sleep 5
for n in $NETWORKS; do
zerotier-cli join ${n}
done
@haakonstorm
Copy link

Typo:

echo 'zerotier_enable="YES"' >> /etc/rc.config

should read

echo 'zerotier_enable="YES"' >> /etc/rc.conf

@wcameronbowen
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment