Hi all, this is my first message here, so i’m a bit newbie.
first, thanks to tailscale staff to have bring such a nice platform, i’m enjoing it very much :).
i’m doing a linux project (with a connected raspberry PI w/raspbian distro). I’m quite familiar with command line, bash etc with basic programming experience.
basically i need to run a command line for each IP in my network as command line parameter, fetching IP list (i.e. parsing first coloumn of “./tailscale status” command). when turned on, raspberry fetches IP list and runs, for example:
bash~: mycommand --100.xxx.xxx.1 --100.xxx.xxx.2 --100.xxx.xxx.3
so i need to make a script to:
- run “tailscale status” (or other mean to fetch network’s IP list)
- parse IPs and make them variables
- run command line “mycommand -ip1 -ip2 …”
Optional but would be nice: When a new machine enters my network, it gets “detected” by the script which runs command for new entry only:
bash~: mycommand 100.xxx.xxx.4
next reboot, new entry get fetched at startup so no need to do anything more.
any suggestion?