From db5143d3b09e32c7880c61087a8a5abdc7f88364 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 16 Oct 2024 11:32:15 +0200 Subject: up --- .local/bin/conky/net.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to '.local/bin/conky/net.sh') diff --git a/.local/bin/conky/net.sh b/.local/bin/conky/net.sh index cde73a0..c4ea3fd 100755 --- a/.local/bin/conky/net.sh +++ b/.local/bin/conky/net.sh @@ -8,6 +8,7 @@ case "$(hostname -s)" in po-rbo) if_main="enx34298f762de7" if_alt="wlp1s0" + if_vpnssl="vpn0" ;; mars) if_main="em0" @@ -31,9 +32,17 @@ else : fi +if [ -z $if_vpnssl ]; then + : +elif ip a | grep $if_vpnssl | grep DOWN >/dev/null 2>&1; then + if_vpnssl="" +fi + echo $if_main'${font}' [ -z $if_wg ] || echo '${color1}WireGuard ${color0}ON${font}' -[ -z $if_wg ] || echo '${color1}WG IP ${color0}${goto 70}${addr '$if_wg'}${font}' -echo '${voffset 3}${color1}LAN IP ${color0}${goto 70}${addr '$if_main'}${font}' -echo '${color1}DNS IP ${color0}${goto 70}${nameserver 0}${font}' -echo '${color1}WAN IP ${color0}${goto 70}${execi 15 curl -s https://ifconfig.me || echo No WAN}${font}' +[ -z $if_wg ] || echo '${color1}WG IP ${color0}${goto 80}${addr '$if_wg'}${font}' +[ -z $if_vpnssl ] || echo '${color1}Forti VPN-SSL ${color0}ON${font}' +[ -z $if_vpnssl ] || echo '${color1}VPN IP ${color0}${goto 80}${addr '$if_vpnssl'}${font}' +echo '${voffset 3}${color1}LAN IP ${color0}${goto 80}${addr '$if_main'}${font}' +echo '${color1}DNS IP ${color0}${goto 80}${nameserver 0}${font}' +echo '${color1}WAN IP ${color0}${goto 80}${execi 15 curl -s https://ifconfig.me || echo No WAN}${font}' -- cgit v1.2.3