diff options
author | jim-p <jimp@pfsense.org> | 2012-03-06 15:52:29 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-03-06 15:53:03 -0500 |
commit | b06dc19616f31d1b4cffc6241dc20eab2b8335bb (patch) | |
tree | e0138325a65ff579d208385934b7457f3fc61110 /etc/rc.carpmaster | |
parent | a4271d123439e022b92a522c32fd70f3feeece3f (diff) | |
download | pfsense-b06dc19616f31d1b4cffc6241dc20eab2b8335bb.zip pfsense-b06dc19616f31d1b4cffc6241dc20eab2b8335bb.tar.gz |
Only run if this is an array
Diffstat (limited to 'etc/rc.carpmaster')
-rwxr-xr-x | etc/rc.carpmaster | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/rc.carpmaster b/etc/rc.carpmaster index aaac868..cb5395e 100755 --- a/etc/rc.carpmaster +++ b/etc/rc.carpmaster @@ -41,10 +41,12 @@ notify_via_growl($notificationmsg); /* Start OpenVPN clients running on this VIP, since they should be in the stopped state while the VIP is CARP Backup. */ global $config; -foreach ($config['openvpn']['openvpn-client'] as $settings) { - if ($settings['interface'] == $argv[1]) { - log_error("Starting OpenVPN instance on {$settings['interface']} because of transition to CARP master."); - openvpn_restart('client', $settings); +if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-client'])) { + foreach ($config['openvpn']['openvpn-client'] as $settings) { + if ($settings['interface'] == $argv[1]) { + log_error("Starting OpenVPN instance on {$settings['interface']} because of transition to CARP master."); + openvpn_restart('client', $settings); + } } } |