dotfiles add
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
WGON(){
|
||||
echo "VPN"
|
||||
WGS='true'
|
||||
}
|
||||
|
||||
WGOFF(){
|
||||
# echo "Off"
|
||||
WGS='false'
|
||||
}
|
||||
|
||||
ifconfig n2400 &>/dev/null && WGON ||WGOFF
|
||||
|
||||
if [ "$1" = '-toggle' ]; then
|
||||
if [ "$WGS" = 'true' ]; then
|
||||
sudo wg-quick down n2400 &>/dev/null
|
||||
else
|
||||
sudo wg-quick up n2400 &>/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user