chore: update vpn.fish to use sudo
This commit is contained in:
@@ -11,6 +11,8 @@ if not test -d $_TEMP
|
|||||||
mkdir -p $_TEMP
|
mkdir -p $_TEMP
|
||||||
end
|
end
|
||||||
|
|
||||||
|
set -x GPG_TTY $(tty)
|
||||||
|
|
||||||
source ~/.config/fish/alias.fish
|
source ~/.config/fish/alias.fish
|
||||||
source ~/.config/fish/prompt.fish
|
source ~/.config/fish/prompt.fish
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ function vpn
|
|||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
if wg-quick up $_path
|
if sudo wg-quick up $_path
|
||||||
echo "true" > "$_TEMP/vpn-status"
|
echo "true" > "$_TEMP/vpn-status"
|
||||||
if not $_silent
|
if not $_silent
|
||||||
echo "Successfully enabled."
|
echo "Successfully enabled."
|
||||||
@@ -71,7 +71,7 @@ function vpn
|
|||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
if wg-quick down $_path
|
if sudo wg-quick down $_path
|
||||||
echo "false" > "$_TEMP/vpn-status"
|
echo "false" > "$_TEMP/vpn-status"
|
||||||
if not $_silent
|
if not $_silent
|
||||||
echo "Successfully disabled."
|
echo "Successfully disabled."
|
||||||
|
|||||||
Reference in New Issue
Block a user