my_konfig
This commit is contained in:
12
config/waybar/vpn-status.sh
Executable file
12
config/waybar/vpn-status.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script checks for a WireGuard interface.
|
||||
WG_INTERFACE="wg0"
|
||||
|
||||
if ip link show "$WG_INTERFACE" &> /dev/null; then
|
||||
# If the interface exists, VPN is on.
|
||||
printf " VPN On\n"
|
||||
else
|
||||
# If not, VPN is off.
|
||||
printf " VPN Off\n"
|
||||
fi
|
||||
Reference in New Issue
Block a user