aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort.inc
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-09-14 22:33:36 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-09-14 22:33:36 -0400
commitd75d69014dfdf62497090c93a507331a4bc4370e (patch)
tree818931e0e2405d5f29146d4aa80102fafd8d8703 /config/snort/snort.inc
parent9037c6b4aa8021c41a14e79b92817ee53d01c20f (diff)
downloadpfsense-packages-d75d69014dfdf62497090c93a507331a4bc4370e.tar.gz
pfsense-packages-d75d69014dfdf62497090c93a507331a4bc4370e.tar.bz2
pfsense-packages-d75d69014dfdf62497090c93a507331a4bc4370e.zip
Tidy up our custom package deinstall function.
Diffstat (limited to 'config/snort/snort.inc')
-rwxr-xr-xconfig/snort/snort.inc9
1 files changed, 3 insertions, 6 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index e579fdac..c4cd311d 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -3031,17 +3031,14 @@ function snort_deinstall() {
}
/**********************************************************/
- /* Test for existence of library backup tarballs in /tmp. */
- /* If these are present, then a package "delete" */
+ /* Test for existence of the snort directory in the PBI */
+ /* path. If not present, then a package "delete" */
/* operation is in progress and we need to wipe out the */
/* configuration files. Otherwise we leave the binary- */
/* side configuration intact since only a GUI files */
/* deinstall and reinstall operation is in progress. */
- /* */
- /* XXX: hopefully a better method presents itself in */
- /* future versions of pfSense. */
/**********************************************************/
- if (file_exists("/tmp/pkg_libs.tgz") || file_exists("/tmp/pkg_bins.tgz")) {
+ 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/");