i3blocks: replace route
command with ip route
This commit is contained in:
parent
3e571bc3ce
commit
c71f7c5730
@ -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" ]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user