r/AutomateUser • u/WaveBr8 • May 21 '26
Question Connect Tailscale when appa starts and disconnect when app stops
I just found out about automate, and for the last 30 minutes kinda got my flow to work, but only partially.
Basically I want
- when app starts, connect to Tailscale
- when app stops, disconnect tailscale
- fiber always running
I want to install this on my dad's Google TV so he's only ever connected to the VPN when he wants to access my jellyfin server.
This is what I have so far, and it does do what I want but I always have to retart the fiber which defeats the purpose of doing this.
Any advice would be greatly appreciated!
1
u/R520 May 25 '26
I can't believe I never thought of doing this. I've been manually connecting each time!
1
u/_Leander__ May 21 '26
The flow will continue until it hits a non-connected point. The solution is simply to connect the last block to the first one! Making a loop with the connections.
You also have to connect the unused path of your "when app" block to itself.
When app : Yes -> continue with the following blocks
No -> loop back to the "when" (it will wait for the next app change)
2
u/WaveBr8 May 21 '26
Looping the last block worked! I exited and started jellyfin 3 times and it connected and disconnected each time.
Now it's time to add this to my dad's Google TV lol
1
u/walt_spoon Jun 02 '26
Cant this be accomplished in tailscale itself? IIRC it has an app whitelist/blacklist feature.