mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	Cleaner columns in iiab-vpn output, when tag &/or relay missing
This commit is contained in:
		
							parent
							
								
									90d6af32a7
								
							
						
					
					
						commit
						08f2f2191c
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -62,7 +62,7 @@ echo -e "    tailscale logout\n" | |||
| #tailscale status --json | jq -r '.Self,.Peer[] | .Tags[] + " " + .TailscaleIPs[] + " " + .HostName + " " + .DNSName + " " + .OS + " " + .Relay + " " + (.Online|tostring)' | sort -V | column -t | ||||
| #echo -e '\e[44;1mVPN peers: ("true" in 6th column means online)\e[0m\n' | ||||
| echo -e '\e[44;1mVPN peers: (6th column = online/offline)\e[0m\n' | ||||
| tailscale status --json | jq -r '.Self,.Peer[] | .Tags[] + " " + .TailscaleIPs[] + " " + .HostName + " " + .DNSName + " " + .Relay + " XXX" + (.Online|tostring) + "XXX " + .OS' | sort -V | column -t | \ | ||||
| tailscale status --json | jq -r '.Self,.Peer[] | (if .Tags[] == "" then "-" else .Tags[] end) + " " + .TailscaleIPs[] + " " + .HostName + " " + .DNSName + " " + (if .Relay == "" then "-" else .Relay end) + " XXX" + (.Online|tostring) + "XXX " + .OS' | sort -V | column -t | \ | ||||
|     while read l; do | ||||
|         line=$(echo "$l" | sed 's/ XXXtrueXXX /\\e[0;32m ✅\\e[0m/ ; s/ XXXfalseXXX /\\e[0;31m ❌ \\e[0m/') | ||||
|         echo -e "$line" $(tailscale whois --json $(echo $line | cut -d' ' -f2) | jq -r '.Node.Hostinfo | .Distro + " " + .DistroVersion + " " + .DeviceModel'); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue