aboutsummaryrefslogtreecommitdiffstats
path: root/config/squid3/34
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-05-06 08:37:34 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-05-06 08:37:34 -0300
commit45452e58e23b67e5d85f53f39a7fe22cb4ccc66a (patch)
tree27a7dea5d148789c5a9bc6bf0c616d646d1aab83 /config/squid3/34
parent8bf803b1cc8b5d81bc1c754d43d307cb98df8169 (diff)
downloadpfsense-packages-45452e58e23b67e5d85f53f39a7fe22cb4ccc66a.tar.gz
pfsense-packages-45452e58e23b67e5d85f53f39a7fe22cb4ccc66a.tar.bz2
pfsense-packages-45452e58e23b67e5d85f53f39a7fe22cb4ccc66a.zip
Check if cachedir exist before try to rename it
Diffstat (limited to 'config/squid3/34')
-rwxr-xr-xconfig/squid3/34/squid.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index 3ef5e270..ee1d8b97 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -129,7 +129,7 @@ function squid_dash_z($cache_action='none') {
$cachedir = ($settings['harddisk_cache_location'] ? $settings['harddisk_cache_location'] : '/var/squid/cache');
- if ($cache_action == "clean") {
+ if ($cache_action == "clean" && file_exists($cachedir)) {
rename ($cachedir, "{$cachedir}.old");
mwexec_bg("/bin/rm -rf {$cachedir}.old");
}