ref: func vpn

This commit is contained in:
TheK4n 2022-05-23 22:37:45 +03:00
parent 055ea94673
commit 1172da2245

View File

@ -161,7 +161,6 @@ wg-toggle() {
SERVICE="wg-quick@$CONFIG.service"
STATUS=$(systemctl status "$SERVICE" | grep Active | awk -F ": " '{printf $2}' | awk -F " " '{printf $1}')
test "$STATUS" != "active" && sudo systemctl start "$SERVICE" || sudo systemctl stop "$SERVICE"
systemctl --quiet is-active "$SERVICE" && sudo systemctl stop "$SERVICE" || sudo systemctl start "$SERVICE"
}