aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata/suricata_uninstall.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-05-21 15:18:51 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-05-21 15:18:51 -0300
commit4c3480ad5ff3d019998bcec1477c357c5e876c11 (patch)
tree787aa92b93df42146e610b72225b93d2fc001606 /config/suricata/suricata_uninstall.php
parent2756de4fc9eb14746bf0d5be7e83826958723201 (diff)
parent97e0eebfbdaa33bd2e7fbf674da94998abf81ced (diff)
downloadpfsense-packages-4c3480ad5ff3d019998bcec1477c357c5e876c11.tar.gz
pfsense-packages-4c3480ad5ff3d019998bcec1477c357c5e876c11.tar.bz2
pfsense-packages-4c3480ad5ff3d019998bcec1477c357c5e876c11.zip
Merge pull request #659 from bmeeks8/suricata-1.0.2
Diffstat (limited to 'config/suricata/suricata_uninstall.php')
-rw-r--r--config/suricata/suricata_uninstall.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/config/suricata/suricata_uninstall.php b/config/suricata/suricata_uninstall.php
index 2317578e..2a82e473 100644
--- a/config/suricata/suricata_uninstall.php
+++ b/config/suricata/suricata_uninstall.php
@@ -58,7 +58,7 @@ killbyname("suricata");
sleep(1);
// Delete any leftover suricata PID files in /var/run
-array_map('@unlink', glob("/var/run/suricata_*.pid"));
+unlink_if_exists("{$g['varrun_path']}/suricata_*.pid");
/* Make sure all active Barnyard2 processes are terminated */
/* Log a message only if a running process is detected */
@@ -68,10 +68,7 @@ killbyname("barnyard2");
sleep(1);
// Delete any leftover barnyard2 PID files in /var/run
-array_map('@unlink', glob("/var/run/barnyard2_*.pid"));
-
-/* Remove the suricata user and group */
-mwexec('/usr/sbin/pw userdel suricata; /usr/sbin/pw groupdel suricata', true);
+unlink_if_exists("{$g['varrun_path']}/barnyard2_*.pid");
/* Remove the Suricata cron jobs. */
install_cron_job("/usr/bin/nice -n20 /usr/local/bin/php -f /usr/local/www/suricata/suricata_check_for_rule_updates.php", false);