Add v6 support to mullvad shell function
This commit is contained in:
parent
57610816be
commit
ccff6c8df3
|
@ -133,7 +133,7 @@ function mullvad() (
|
||||||
if (( $# < 1 )); then
|
if (( $# < 1 )); then
|
||||||
echo "USAGE: $0 LOCATION|off" >&2
|
echo "USAGE: $0 LOCATION|off" >&2
|
||||||
fi
|
fi
|
||||||
current_interfaces="$(ip -o a|grep -o '[0-9]*:\ mullvad-[a-z][a-z][0-9]*'|uniq|cut -d: -f2|tr -d ' ')"
|
current_interfaces="$(ip -o a|grep -oE '[0-9]*:\ mullvad-(v6-)?[a-z][a-z][0-9]*'|uniq|cut -d: -f2|tr -d ' ')"
|
||||||
for current_interface in $current_interfaces; do
|
for current_interface in $current_interfaces; do
|
||||||
sudo wg-quick down "$current_interface"
|
sudo wg-quick down "$current_interface"
|
||||||
done
|
done
|
||||||
|
|
Reference in a new issue