Just grab zerotier-hosts.sh
, chmod +x
it and go.
zerotier-hosts.sh --token API_TOKEN [--network NETWORK_NAME] [--suffix SUFFIX]
See zerotier-hosts.sh --help
for more information.
Setup a cronjob to run this periodically:
# Update zerotier hosts file ever hour
0 * * * * /usr/bin/zerotier-hosts.sh --suffix wg --output /tmp/hosts.zerotier