https://github.com/locus313/zerotier-api-scripts
Bash scripts to work with the Zerotier API
https://github.com/locus313/zerotier-api-scripts
zerotier zerotier-api
Last synced: 3 months ago
JSON representation
Bash scripts to work with the Zerotier API
- Host: GitHub
- URL: https://github.com/locus313/zerotier-api-scripts
- Owner: locus313
- License: mit
- Created: 2021-07-24T20:47:56.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-26T07:58:15.000Z (about 4 years ago)
- Last Synced: 2025-01-03T14:17:25.823Z (9 months ago)
- Topics: zerotier, zerotier-api
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Zerotier API Scripts
==================This is a collection of bash scripts using curl I created to automate things with the [Zerotier API](https://docs.zerotier.com/central/v1/).
* [Installation](#installation)
* [Options](#options)
* [Usage](#usage)Installation
------------Requirements:
* bash (recommend version 4+)
* [curl](https://curl.haxx.se)
* [jq](https://stedolan.github.io/jq)Clone the repo, download a source zip or copy the shell scripts as needed.
Options
------------
```
Required enviroment variables:
ZEROTIER_TOKEN - set with your zerotier api token
NETWORK_ID - set with your network id
Available commands:
list-networks (ln): List zerotier networks
list-members (lm): List zerotier network members
update-member (um): Update zerotier member
quit: Exit from this menu
```Usage
------------### List networks
```BASH
./zerotier.sh ln
network_name aaaabbbbccccdddd
```
### List network members
```BASH
./zerotier.sh lm
network_member_1 aaaabbbccc true 10.1.1.10
ddddeeefff false null
```
### Update network member
When running this command it will automatically authorize the network member
```BASH
./zerotier.sh um ddddeeefff network_member_2
```