aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata/suricata.inc
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-09-20 18:03:43 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-12-15 12:04:37 -0500
commit16e975b4421e04052b7f87d6d65690ca4c57119f (patch)
tree4a4f30fe924fa9d58d1ed248501ff5603a4052db /config/suricata/suricata.inc
parentb1d0505eef8c0d30e20adb2d514f7f135acc5e9d (diff)
downloadpfsense-packages-16e975b4421e04052b7f87d6d65690ca4c57119f.tar.gz
pfsense-packages-16e975b4421e04052b7f87d6d65690ca4c57119f.tar.bz2
pfsense-packages-16e975b4421e04052b7f87d6d65690ca4c57119f.zip
Replace calls to @unlink with unlink_if_exists().
Diffstat (limited to 'config/suricata/suricata.inc')
-rw-r--r--config/suricata/suricata.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/config/suricata/suricata.inc b/config/suricata/suricata.inc
index 5fde5e3d..31947f99 100644
--- a/config/suricata/suricata.inc
+++ b/config/suricata/suricata.inc
@@ -685,7 +685,7 @@ function sync_suricata_package_config() {
// Do not start config build if there are no Suricata-configured interfaces
if (!is_array($config['installedpackages']['suricata']) || !is_array($config['installedpackages']['suricata']['rule'])) {
- @unlink("{$rcdir}suricata.sh");
+ unlink_if_exists("{$rcdir}suricata.sh");
conf_mount_ro();
return;
}
@@ -853,19 +853,19 @@ function suricata_post_delete_logs($suricata_uuid = 0) {
// Keep most recent file
unset($filelist[count($filelist) - 1]);
foreach ($filelist as $file)
- @unlink($file);
+ unlink_if_exists($file);
/* Clean-up Barnyard2 archived files if any exist */
$filelist = glob("{$suricata_log_dir}/barnyard2/archive/unified2.alert.*");
foreach ($filelist as $file)
- @unlink($file);
+ unlink_if_exists($file);
/* Clean-up packet capture files if any exist */
$filelist = glob("{$suricata_log_dir}/log.pcap.*");
// Keep most recent file
unset($filelist[count($filelist) - 1]);
foreach ($filelist as $file)
- @unlink($file);
+ unlink_if_exists($file);
unset($filelist);
}
}