12 lines
260 B
Bash
Executable File
12 lines
260 B
Bash
Executable File
#!/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 |