Add wg() function
This commit is contained in:
parent
d2906e8f11
commit
66fbb26ccc
|
@ -59,3 +59,14 @@ open() {
|
|||
fi
|
||||
}
|
||||
|
||||
wg() {
|
||||
(( ${+commands[wg]} )) && (( ${+commands[wg-quick]} )) || return 2
|
||||
|
||||
if [[ $1 == up ]]; then
|
||||
sudo wg-quick up $2
|
||||
elif [[ $1 == down ]]; then
|
||||
sudo wg-quick down $2
|
||||
else
|
||||
command wg "$@"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue