diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-20 18:03:43 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-12-15 12:04:37 -0500 |
commit | 16e975b4421e04052b7f87d6d65690ca4c57119f (patch) | |
tree | 4a4f30fe924fa9d58d1ed248501ff5603a4052db /config/suricata/suricata_uninstall.php | |
parent | b1d0505eef8c0d30e20adb2d514f7f135acc5e9d (diff) | |
download | pfsense-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_uninstall.php')
-rw-r--r-- | config/suricata/suricata_uninstall.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/config/suricata/suricata_uninstall.php b/config/suricata/suricata_uninstall.php index e55a43b2..817c9ebd 100644 --- a/config/suricata/suricata_uninstall.php +++ b/config/suricata/suricata_uninstall.php @@ -80,7 +80,7 @@ install_cron_job("{$suri_pf_table}" , false); /* See if we are to keep Suricata log files on uninstall */ if ($config['installedpackages']['suricata']['config'][0]['clearlogs'] == 'on') { log_error(gettext("[Suricata] Clearing all Suricata-related log files...")); - @unlink("{$suricata_rules_upd_log}"); + unlink_if_exists("{$suricata_rules_upd_log}"); rmdir_recursive("{$suricatalogdir}"); } @@ -112,9 +112,9 @@ if (!empty($widgets)) { $config['widgets']['sequence'] = implode(",", $widgetlist); write_config("Suricata pkg: remove Suricata Dashboard Widget on package deinstall."); } -@unlink("/usr/local/www/widgets/include/widget-suricata.inc"); -@unlink("/usr/local/www/widgets/widgets/suricata_alerts.widget.php"); -@unlink("/usr/local/www/widgets/javascript/suricata_alerts.js"); +unlink_if_exists("/usr/local/www/widgets/include/widget-suricata.inc"); +unlink_if_exists("/usr/local/www/widgets/widgets/suricata_alerts.widget.php"); +unlink_if_exists("/usr/local/www/widgets/javascript/suricata_alerts.js"); // Finished with filesystem mods so remount it read-only conf_mount_ro(); @@ -124,7 +124,7 @@ if ($config['installedpackages']['suricata']['config'][0]['forcekeepsettings'] ! log_error(gettext("Not saving settings... all Suricata configuration info and logs deleted...")); unset($config['installedpackages']['suricata']); unset($config['installedpackages']['suricatasync']); - @unlink("{$suricata_rules_upd_log}"); + unlink_if_exists("{$suricata_rules_upd_log}"); rmdir_recursive("{$suricatalogdir}"); rmdir_recursive("{$sidmodspath}"); rmdir_recursive("{$iprep_path}"); |