aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-09-18 21:31:41 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-09-18 21:31:41 -0400
commit5cff64ffa70be00598c4fb76566f345bd5a329c4 (patch)
treedb7774de3156ecdf084adb945eb9fdc801c13d0f /config/snort
parente013f70da2e59de226337bf54d001b069e9e59ec (diff)
downloadpfsense-packages-5cff64ffa70be00598c4fb76566f345bd5a329c4.tar.gz
pfsense-packages-5cff64ffa70be00598c4fb76566f345bd5a329c4.tar.bz2
pfsense-packages-5cff64ffa70be00598c4fb76566f345bd5a329c4.zip
Replace hard-coded paths with system globals where possible.
Diffstat (limited to 'config/snort')
-rwxr-xr-xconfig/snort/snort.inc4
-rw-r--r--config/snort/snort_post_install.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index ca527b31..bf2af306 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -3011,7 +3011,7 @@ function snort_deinstall() {
mwexec('/usr/bin/killall -9 snort', true);
sleep(2);
// Delete any leftover snort PID files in /var/run
- unlink_if_exists("/var/run/snort_*.pid");
+ unlink_if_exists("{$g['varrun_path']}/snort_*.pid");
/* Make sure all active Barnyard2 processes are terminated */
/* Log a message only if a running process is detected */
@@ -3022,7 +3022,7 @@ function snort_deinstall() {
mwexec('/usr/bin/killall -9 barnyard2', true);
sleep(2);
// Delete any leftover barnyard2 PID files in /var/run
- unlink_if_exists("/var/run/barnyard2_*.pid");
+ unlink_if_exists("{$g['varrun_path']}/barnyard2_*.pid");
/* Remove our custom <service> entries from config */
$is_dirty = FALSE;
diff --git a/config/snort/snort_post_install.php b/config/snort/snort_post_install.php
index a7693f1a..bbdbe476 100644
--- a/config/snort/snort_post_install.php
+++ b/config/snort/snort_post_install.php
@@ -77,14 +77,14 @@ if(is_process_running("snort")) {
exec("/usr/bin/killall -z snort");
sleep(2);
// Delete any leftover snort PID files in /var/run
- unlink_if_exists("/var/run/snort_*.pid");
+ unlink_if_exists("{$g['varrun_path']}/snort_*.pid");
}
// Hard kill any running Barnyard2 processes
if(is_process_running("barnyard")) {
exec("/usr/bin/killall -z barnyard2");
sleep(2);
// Delete any leftover barnyard2 PID files in /var/run
- unlink_if_exists("/var/run/barnyard2_*.pid");
+ unlink_if_exists("{$g['varrun_path']}/barnyard2_*.pid");
}
/* Set flag for post-install in progress */