aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort.inc
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-10-09 14:22:57 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-10-09 14:22:57 -0400
commitc26b1f33f4d0a33a148f79dd9d91bedfef96a7c4 (patch)
tree6c63501fb2d794902745f1f8f81ba496bca38ea6 /config/snort/snort.inc
parente65dc63a88e4bd40c21d99c7abe6f8c7c7a9d51b (diff)
downloadpfsense-packages-c26b1f33f4d0a33a148f79dd9d91bedfef96a7c4.tar.gz
pfsense-packages-c26b1f33f4d0a33a148f79dd9d91bedfef96a7c4.tar.bz2
pfsense-packages-c26b1f33f4d0a33a148f79dd9d91bedfef96a7c4.zip
Fix so we remove the /var/db/snort directory on pkg deinstall.
Diffstat (limited to 'config/snort/snort.inc')
-rwxr-xr-xconfig/snort/snort.inc17
1 files changed, 8 insertions, 9 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index d2f3a384..261c100f 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -2967,6 +2967,8 @@ case $1 in
start)
if [ ! -f {$g['varrun_path']}/snort_pkg_starting.lck ]; then
rc_start
+ else
+ /usr/bin/logger -p daemon.info -i -t SnortStartup "Ignoring additional START command since Snort is already starting..."
fi
;;
stop)
@@ -3112,8 +3114,6 @@ function snort_deinstall() {
$snortlogdir = SNORTLOGDIR;
$rcdir = RCFILEPREFIX;
$snort_rules_upd_log = SNORT_RULES_UPD_LOGFILE;
- $iprep_path = SNORT_IPREP_PATH;
- $sidmods_path = SNORT_SID_MODS_PATH;
log_error(gettext("[Snort] Snort package uninstall in progress..."));
@@ -3217,10 +3217,10 @@ function snort_deinstall() {
if (!is_dir("{$snortdir}")) {
log_error(gettext("[Snort] Package deletion requested... removing all files..."));
unlink_if_exists("{$rcdir}snort.sh");
- rmdir_recursive("/usr/local/pkg/snort/");
- rmdir_recursive("/usr/local/www/snort/");
- rmdir_recursive("/usr/local/etc/snort/");
- rmdir_recursive("/usr/local/lib/snort/");
+ rmdir_recursive("/usr/local/pkg/snort");
+ rmdir_recursive("/usr/local/www/snort");
+ rmdir_recursive("/usr/local/etc/snort");
+ rmdir_recursive("/usr/local/lib/snort");
}
/* Keep this as a last step */
@@ -3231,9 +3231,8 @@ function snort_deinstall() {
unlink_if_exists("{$snort_rules_upd_log}");
log_error(gettext("[Snort] Flushing <snort2c> firewall table to remove addresses blocked by Snort..."));
mwexec("/sbin/pfctl -t snort2c -T flush");
- rmdir_recursive($snortlogdir);
- rmdir_recursive($iprep_path);
- rmdir_recursive($sidmods_path);
+ rmdir_recursive("{$snortlogdir}");
+ rmdir_recursive("{$g['vardb_path']}/snort");
log_error(gettext("[Snort] The package has been removed from this system..."));
}
}