fix: wireguard status for waybar
This commit is contained in:
parent
e928d2e4c9
commit
cc803cae27
11 changed files with 68 additions and 57 deletions
|
|
@ -4,9 +4,9 @@ INTERFACE="wg0"
|
|||
|
||||
if [ "$1" = "toggle" ]; then
|
||||
if ip link show "$INTERFACE" >/dev/null 2>&1; then
|
||||
pkexec wg-quick down "$INTERFACE"
|
||||
pkexec systemctl stop wg-quick-wg0.service
|
||||
else
|
||||
pkexec wg-quick up "$INTERFACE"
|
||||
pkexec systemctl start wg-quick-wg0.service
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue