i3blocks: replace route command with ip route
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
INSTANCE="${BLOCK_INSTANCE:-}"
|
INSTANCE="${BLOCK_INSTANCE:-}"
|
||||||
|
|
||||||
# Check VPN status
|
# 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
|
# Store status
|
||||||
if [[ $GET_VPN == *"tun0"* || $GET_VPN == "$INSTANCE" ]]
|
if [[ $GET_VPN == *"tun0"* || $GET_VPN == "$INSTANCE" ]]
|
||||||
|
|||||||
Reference in New Issue
Block a user