connect/disconnect hooks

Anthony Sharobaiko anthony.sharobaiko at gmail.com
Tue May 18 09:18:06 BST 2021


On Mon, May 17, 2021 at 7:52 PM Daniel Lenski <dlenski at gmail.com> wrote:
> On Sun, May 16, 2021 at 1:21 AM Anthony Sharobaiko
> <anthony.sharobaiko at gmail.com> wrote:
> > I'd like to perform certain actions (e.g. mounting vpn-internal NFS
> > volumes) after a vpn connection is established. Patching
> > vpnc-script/vpn-slice is fine for me, but I'd like to discuss a more
> > generic solution - to have either openconnect itself or the companion
> > script execute  /etc/openconnect/(dis)?connect-hooks.d/* or something
> > similar.
>
> The standard vpnc-script already *has* hooks.
>
> The default directory is /etc/vpnc (for historical reasons), but
> otherwise they pretty much match what you're looking for here, I
> think: https://gitlab.com/openconnect/vpnc-scripts/blob/master/vpnc-script#L1128-1160

Thank you! But I use vpn-slice and it doesn't have those =( (at least
I don't see anything around/in do_connect() there)
Would you accept a PR with such functionality?

Thanks.



More information about the openconnect-devel mailing list