aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-10-10 12:20:36 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-10-10 12:20:36 -0400
commitce524b763954723facf1353566e69d292b4279f7 (patch)
treeb4762f3fccfab11bd7f2216ffc5ae5f48c605758 /config/snort
parent89fed0a8a4281b7b1613b149b7e9734bde93acf0 (diff)
downloadpfsense-packages-ce524b763954723facf1353566e69d292b4279f7.tar.gz
pfsense-packages-ce524b763954723facf1353566e69d292b4279f7.tar.bz2
pfsense-packages-ce524b763954723facf1353566e69d292b4279f7.zip
Use isvalidpid() function instead of testing for PID file when restarting.
Diffstat (limited to 'config/snort')
-rwxr-xr-xconfig/snort/snort.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index 4b1adc90..e8fd4bbc 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -600,7 +600,7 @@ function snort_barnyard_start($snortcfg, $if_real, $background=FALSE) {
$snortlogdir = SNORTLOGDIR;
$snort_uuid = $snortcfg['uuid'];
- if ($snortcfg['barnyard_enable'] == 'on' && !file_exists("{$g['varrun_path']}/barnyard2_{$if_real}{$snort_uuid}.pid")) {
+ if ($snortcfg['barnyard_enable'] == 'on' && !isvalidpid("{$g['varrun_path']}/barnyard2_{$if_real}{$snort_uuid}.pid")) {
log_error("[Snort] Barnyard2 START for " . convert_real_interface_to_friendly_descr($if_real) . "({$if_real})...");
if ($background)
mwexec_bg("/usr/local/bin/barnyard2 -r {$snort_uuid} -f \"snort_{$snort_uuid}_{$if_real}.u2\" --pid-path {$g['varrun_path']} --nolock-pidfile -c {$snortdir}/snort_{$snort_uuid}_{$if_real}/barnyard2.conf -d {$snortlogdir}/snort_{$if_real}{$snort_uuid} -D -q");
@@ -616,7 +616,7 @@ function snort_start($snortcfg, $if_real, $background=FALSE) {
$snortlogdir = SNORTLOGDIR;
$snort_uuid = $snortcfg['uuid'];
- if ($snortcfg['enable'] == 'on' && !file_exists("{$g['varrun_path']}/snort_{$if_real}{$snort_uuid}.pid")) {
+ if ($snortcfg['enable'] == 'on' && !isvalidpid("{$g['varrun_path']}/snort_{$if_real}{$snort_uuid}.pid")) {
log_error("[Snort] Snort START for " . convert_real_interface_to_friendly_descr($if_real) . "({$if_real})...");
if ($background)
mwexec_bg("/usr/local/bin/snort -R {$snort_uuid} -D -q -l {$snortlogdir}/snort_{$if_real}{$snort_uuid} --pid-path {$g['varrun_path']} --nolock-pidfile -G {$snort_uuid} -c {$snortdir}/snort_{$snort_uuid}_{$if_real}/snort.conf -i {$if_real}");