diff options
author | sullrich <sullrich@pfsense.org> | 2009-12-05 19:09:48 -0500 |
---|---|---|
committer | sullrich <sullrich@pfsense.org> | 2009-12-05 19:09:48 -0500 |
commit | 2394394f99e792ca165d3aae1c54228b5c9edd02 (patch) | |
tree | e6726c810423a6ae6740331e9387dad69ca5be5a /config/rate/rate.inc | |
parent | 191d39b8c2586455462d4634a403cdb3f0a68e31 (diff) | |
download | pfsense-packages-2394394f99e792ca165d3aae1c54228b5c9edd02.tar.gz pfsense-packages-2394394f99e792ca165d3aae1c54228b5c9edd02.tar.bz2 pfsense-packages-2394394f99e792ca165d3aae1c54228b5c9edd02.zip |
Use unlink_if_exists
Diffstat (limited to 'config/rate/rate.inc')
-rw-r--r-- | config/rate/rate.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/rate/rate.inc b/config/rate/rate.inc index 0b3ad769..34d394ab 100644 --- a/config/rate/rate.inc +++ b/config/rate/rate.inc @@ -5,7 +5,7 @@ function rate_install() { conf_mount_rw(); /* Copy files for backup. */ mwexec("cp /usr/local/www/status_graph.php /usr/local/www/status_graph.php.orig"); - unlink("/usr/local/www/status_graph.php"); + unlink_if_exists("/usr/local/www/status_graph.php"); mwexec("cp /usr/local/pkg/bandwidth_by_ip.php /usr/local/www/bandwidth_by_ip.php"); mwexec("cp /usr/local/pkg/status_graph.php /usr/local/www/status_graph.php"); @@ -17,8 +17,8 @@ function rate_install() { function rate_deinstall() { conf_mount_rw(); - unlink("/usr/local/www/status_graph.php"); - unlink("/usr/local/www/bandwidth_by_ip.php"); + unlink_if_exists("/usr/local/www/status_graph.php"); + unlink_if_exists("/usr/local/www/bandwidth_by_ip.php"); mwexec("cp /usr/local/www/status_graph.php.orig /usr/local/www/status_graph.php"); conf_mount_ro(); } |