From 9db8c46dff30587e7505f84783f14fa915951b4a Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 5 Jul 2013 11:46:54 -0400 Subject: When a CARP VIP transitions to master, we need to bump servers also, otherwise a transition from disabled or init may not properly (re)attach to the IP address. --- etc/rc.carpmaster | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'etc/rc.carpmaster') diff --git a/etc/rc.carpmaster b/etc/rc.carpmaster index f57d150..50db028 100755 --- a/etc/rc.carpmaster +++ b/etc/rc.carpmaster @@ -50,5 +50,13 @@ if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-client' } } } +if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-server'])) { + foreach ($config['openvpn']['openvpn-server'] as $settings) { + if ($settings['interface'] == $argv[1]) { + log_error("Starting OpenVPN instance on {$settings['interface']} because of transition to CARP master."); + openvpn_restart('server', $settings); + } + } +} ?> \ No newline at end of file -- cgit v1.1