fix func wg-toggle
This commit is contained in:
parent
2aafcf969d
commit
055ea94673
@ -162,6 +162,6 @@ wg-toggle() {
|
||||
SERVICE="wg-quick@$CONFIG.service"
|
||||
|
||||
STATUS=$(systemctl status "$SERVICE" | grep Active | awk -F ": " '{printf $2}' | awk -F " " '{printf $1}')
|
||||
test "$STATUS" = "inactive" && sudo systemctl start "$SERVICE" || sudo systemctl stop "$SERVICE"
|
||||
test "$STATUS" != "active" && sudo systemctl start "$SERVICE" || sudo systemctl stop "$SERVICE"
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user