i3blocks: replace route command with ip route

This commit is contained in:
Jesús 2021-09-05 13:59:36 -05:00
parent 3e571bc3ce
commit c71f7c5730
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -3,7 +3,7 @@
INSTANCE="${BLOCK_INSTANCE:-}"
# Check VPN status
GET_VPN=$(route | grep -E -- "tun0|$INSTANCE" | awk '{ print $NF }')
GET_VPN=$(ip route | grep -E -- "tun0|$INSTANCE" | awk '{ print $3 }')
# Store status
if [[ $GET_VPN == *"tun0"* || $GET_VPN == "$INSTANCE" ]]