Openvpn can execute a script upon connection using the --up parameter. However this does not seem to work at reconnecting, i.e. when a connection is lost and openvpn automatically reconnects. Is this normal behaviour and is there a way to execute scripts on reconnect too?
Background is that there is a service that supposed to communicate over a VPN. If the connection gets lost, the service might timeout and quit. Therefore I want to have a script running on VPN-connection, that checks if the service is running and if not, starting it.