From 5cff64ffa70be00598c4fb76566f345bd5a329c4 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Thu, 18 Sep 2014 21:31:41 -0400 Subject: Replace hard-coded paths with system globals where possible. --- config/snort/snort.inc | 4 ++-- config/snort/snort_post_install.php | 4 ++-- 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 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 */ -- cgit v1.2.3