Merge branch 'dev' into mercury

status: fix openvpn check
        fix openvpn status display
This commit is contained in:
David JULIEN 2023-01-19 19:18:07 +01:00
commit 65572204a3
Signed by: swytch
GPG Key ID: 498590A3AA82A06F
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ eth="$(cat /sys/class/net/enp0s31f6/operstate &> /dev/null)"
if [ "up" = "$eth" ]; then
str="$(printf "%s / " "$str")"
fi
vpn="$(pidof openvpn)"
[ -n "$vpn" ] && str="$(printf "%s " "$str")"
vpn="$(ip route | head -n1 | rev | cut -d' ' -f2 | rev)"
[ "tun0" = "$vpn" -o "tap0" = "$vpn" ] && str="$(printf "%s / " "$str")"
printf " %s " "$str"