4 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
6 x
="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*} # directory of this file
8 # see lan-dyn-dns-update. this is the corresponding script for on connect/disconnect from vpn
11 ssh_cmd
="ssh -F$d/.config -i$d/home root@wrt.b8.nz cedit ovpn-$X509_0_CN /etc/hosts"
13 client-connect
) $ssh_cmd <<<"$ifconfig_pool_remote_ip $X509_0_CN"||
[[ $?
== 1 ]]
16 $ssh_cmd <<<$
(grep -F $X509_0_CN lan-dns
) ||
[[ $?
== 1 ]]