reducing repetitive calls
This commit is contained in:
parent
86b51fc94f
commit
82b155ce80
8
bashrc
8
bashrc
|
@ -16,14 +16,16 @@ dfa() {
|
||||||
}
|
}
|
||||||
vpn() {
|
vpn() {
|
||||||
if [ "$1" == "on" ]; then
|
if [ "$1" == "on" ]; then
|
||||||
doas protonvpn c --p2p
|
cmd="c --p2p"
|
||||||
elif [ "$1" == "off" ]; then
|
elif [ "$1" == "off" ]; then
|
||||||
doas protonvpn d
|
cmd="d"
|
||||||
elif [ "$1" == "status" ]; then
|
elif [ "$1" == "status" ]; then
|
||||||
doas protonvpn s
|
cmd="s"
|
||||||
else
|
else
|
||||||
echo "Please pass an argument: on, off, status"
|
echo "Please pass an argument: on, off, status"
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
|
doas protonvpn "$cmd"
|
||||||
}
|
}
|
||||||
ip_check() {
|
ip_check() {
|
||||||
curl wgetip.net/n
|
curl wgetip.net/n
|
||||||
|
|
Loading…
Reference in New Issue