i3blocks: script vpn update

This commit is contained in:
Jesús 2022-04-13 11:00:04 +08:00
parent 7396cc709d
commit 6993d61090
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=$(ip route | grep -E -- "tun0|wg0|$INSTANCE" | awk '{ print $3 }')
GET_VPN=$(ip route get 4.2.2.1 | grep -E -- "tun0|wg0|$INSTANCE" | awk '{ print $3 }')
# Store status
case $GET_VPN in