aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-05-14 14:06:09 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-05-14 14:06:09 -0400
commit99b5013e94ede6ab5f3dc16a5996d4ce1f1a52b3 (patch)
tree3ddc20c25014cf7c604f0e7651b7981a11e93edd /config
parent0909bcf44cc4535c9dbb19f226fdb01c442175ff (diff)
downloadpfsense-packages-99b5013e94ede6ab5f3dc16a5996d4ce1f1a52b3.tar.gz
pfsense-packages-99b5013e94ede6ab5f3dc16a5996d4ce1f1a52b3.tar.bz2
pfsense-packages-99b5013e94ede6ab5f3dc16a5996d4ce1f1a52b3.zip
Use system functions where possible & omit deletion of suricata user.
Diffstat (limited to 'config')
-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);