dotcli: Wrapper for VPN connection.

This commit is contained in:
2026-07-10 10:13:02 -04:00
parent 62109e993a
commit 8c35889884
3 changed files with 104 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
function _dot_vpn_usage
echo "usage: dot vpn <command>
Commands:
up bring the UDM-PRO-Laptop WireGuard connection up
down bring the UDM-PRO-Laptop WireGuard connection down
help show this message"
end
function _dot_vpn
if test "$argv[1]" = help
_dot_vpn_usage
return 0
end
set -l connection UDM-PRO-Laptop
switch "$argv[1]"
case up
nmcli connection up $connection
return $status
case down
nmcli connection down $connection
return $status
case '*'
_dot_vpn_usage
return 1
end
end