diff options
-rw-r--r-- | etc/inc/ipsec.inc | 12 |
1 files changed, 8 insertions, 4 deletions
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) { |