style: vpn func
This commit is contained in:
parent
357170edcd
commit
190a4d8ab1
@ -171,7 +171,9 @@ vpn() {
|
||||
|
||||
SERVICE="wg-quick@$CONFIG.service"
|
||||
|
||||
systemctl --quiet is-active "$SERVICE" && sudo systemctl stop "$SERVICE" || sudo systemctl start "$SERVICE"
|
||||
systemctl --quiet is-active "$SERVICE" && \
|
||||
(sudo systemctl stop "$SERVICE" && echo DOWN) || \
|
||||
(sudo systemctl start "$SERVICE" && ip -br a | grep wg0 | awk '{print $1":\t"$3}')
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user