Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for running a command on VPN disconnection
When using VPN, I typically run a handful of SSH sessions to different servers. For convenience/stability/performance, I run those sessions over SSH ControlMaster connections. When I jump off the VPN, those master connections are left hanging and so are any SSH sessions using them. Even if I reconnect VPN, the master connection and its sessions are still non-responsive. And if I try to start a new SSH session, that will simply reuse the stale connection and will also hang with no progress or indication of what's wrong. My solution is to kill the stale master connections (also kills any lingering SSH sessions, and allows new sessions to establish a new, working, ControlMaster connection). I want this to happen automatically when I disconnect from VPN. This patch allows me to configure a command to be run automatically when disconnecting from VPN.
- Loading branch information