From 68e322065dfe9907492ffbdb5484934427a998a2 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Tue, 31 Mar 2015 15:18:26 -0500 Subject: Add a check for whether IPsec is enabled, so it doesn't spit out "IPsec daemon not running or has a problem!" when IPsec isn't enabled. --- etc/inc/ipsec.inc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc index d7cdf2a..aef66fe 100644 --- a/etc/inc/ipsec.inc +++ b/etc/inc/ipsec.inc @@ -394,10 +394,14 @@ function ipsec_phase2_status(&$ipsec_status, &$phase2) { function ipsec_smp_dump_status() { global $config, $g, $custom_listtags; - if (!file_exists("{$g['varrun_path']}/charon.xml")) { - log_error("IPsec daemon not running or has a problem!"); - return; - } + if (isset($config['ipsec']['enable'])) { + if (!file_exists("{$g['varrun_path']}/charon.xml")) { + log_error("IPsec daemon not running or has a problem!"); + return; + } + } else { + return; + } $fd = @fsockopen("unix://{$g['varrun_path']}/charon.xml"); if (!$fd) { -- cgit v1.1