X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=vpn-client-connect;fp=vpn-client-connect;h=0000000000000000000000000000000000000000;hb=9c77c557e60d21caceeef1e78e35b35ed968fca9;hp=c3c9e8a9f7930cfa6604f7b7d1067bbda7c2408e;hpb=d6def754cd241538c61456536b52ee51cbd85b42;p=distro-setup diff --git a/vpn-client-connect b/vpn-client-connect deleted file mode 100755 index c3c9e8a..0000000 --- a/vpn-client-connect +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR - -x="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*} # directory of this file - -# see lan-dyn-dns-update. this is the corresponding script for on connect/disconnect from vpn - -d=/p/ovpn-ssh -ssh_cmd="ssh -F$d/.config -i$d/home root@wrt.b8.nz cedit ovpn-$X509_0_CN /etc/hosts" -case $script_type in - client-connect) $ssh_cmd <<<"$ifconfig_pool_remote_ip $X509_0_CN"|| [[ $? == 1 ]] - ;; - client-disconnect) - $ssh_cmd <<<$(grep -F $X509_0_CN lan-dns) || [[ $? == 1 ]] - ;; -esac