1
0

chore: update vpn.fish to use sudo

This commit is contained in:
2025-07-04 17:57:14 +02:00
parent b5d76327ed
commit a6f1537b1d
2 changed files with 5 additions and 3 deletions

View File

@@ -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

View File

@@ -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."