Skip to content

Commit 7f90cd1

Browse files
remove jq as dependency. fix bug where exitnode icon is displayed when tailscale is down.
1 parent 2919c24 commit 7f90cd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/network_vpn.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ vpn_function() {
2525
# if tailscale is installed
2626
#
2727
# https://www.reddit.com/r/Tailscale/comments/18dirro/is_there_a_way_i_can_tell_which_exit_node_i_am/
28-
node=$(tailscale status --peers --json | jq '.ExitNodeStatus')
28+
node=$(tailscale status | grep "; exit node")
2929
if [[ -z $node ]] || [[ "$node" == 'null' ]]; then
3030
# no tailscale exit node, no output, since trafic isnt actually rerouted
3131
echo ""
@@ -64,7 +64,7 @@ vpn_function() {
6464
# always show as connected for some reason.
6565
#
6666
# https://www.reddit.com/r/Tailscale/comments/18dirro/is_there_a_way_i_can_tell_which_exit_node_i_am/
67-
node=$(tailscale status --peers --json | jq '.ExitNodeStatus')
67+
node=$(tailscale status | grep "; exit node")
6868
if [[ -z $node ]] || [[ "$node" == 'null' ]]; then
6969
# no tailscale exit node, no output, since trafic isnt actually rerouted
7070
echo ""

0 commit comments

Comments
 (0)