Merge branch 'dev' into thesis

status: fix openvpn status check
        fix openvpn status display
This commit is contained in:
David JULIEN 2023-01-20 10:40:00 +01:00
commit 48ef15d12b
No known key found for this signature in database
GPG Key ID: 1DD6B2BA6DD78810
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ eth="$(cat /sys/class/net/eth0/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"