summaryrefslogtreecommitdiffstats
path: root/etc/rc.carpmaster
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-03-06 15:52:29 -0500
committerjim-p <jimp@pfsense.org>2012-03-06 15:52:29 -0500
commit2156f02a8262f2b13f826b91bb0f3190c18042be (patch)
tree2b65e39ff580611420370971809033a38135ff41 /etc/rc.carpmaster
parent9ea0cb90a6f7685cd29f018895aefbb70e25a5d6 (diff)
downloadpfsense-2156f02a8262f2b13f826b91bb0f3190c18042be.zip
pfsense-2156f02a8262f2b13f826b91bb0f3190c18042be.tar.gz
Only run if this is an array
Diffstat (limited to 'etc/rc.carpmaster')
-rwxr-xr-xetc/rc.carpmaster10
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);
+ }
}
}
OpenPOWER on IntegriCloud