sane-vpn: lint

This commit is contained in:
Colin 2024-05-25 10:40:59 +00:00
parent 6365bb7594
commit 59e4256dd8

View File

@ -24,12 +24,13 @@ vpns=()
defaultVpn=
# loaded from a specific ~/.config/sane-vpn/vpns profile
id=
fwmark=
prioMain=
prioFwMark=
bridgeDevice=
addrV4=
dns=()
fwmark=
id=
name=
priorityFwMark=
priorityMain=
debug() {
if [ -n "$SANE_VPN_DEBUG" ]; then
@ -46,15 +47,7 @@ getVpns() {
# load a specific VPN profile, `"$1"`
sourceVpn() {
# populates:
# - id
# - fwmark
# - prioMain
# - prioFwMark
# - bridgeDevice
# - addrV4
# - name
# - dns
# populates: variables declared above
debug "sourcing: ~/.config/sane-vpn/vpns/$1"
# TODO: don't blindly source this, but parse explicitly as `K=V`
source ~/.config/sane-vpn/vpns/$1