Zero-tier status script

There is an easy way to check clients status of your zerotier vpn.

RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color

net=yournetworkIDhere
 curl -s -H "Authorization: Bearer YOURTOKENHERE" -H "Content-Type: application/json" https://my.zerotier.com/api/network/$net/member |  jq -r 'def colors: {"red": "\u001b[31m","green": "\u001b[32m","reset": "\u001b[0m",  };  .[]| "\(.name)***\(.config.ipAssignments[0])***" + colors.green + "\(.online)"+ colors.reset ' -c | column -t -s "***"

Lascia un commento