aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/squid/swapstate_check.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/config/squid/swapstate_check.php b/config/squid/swapstate_check.php
index d70c2dd4..77730e33 100644
--- a/config/squid/swapstate_check.php
+++ b/config/squid/swapstate_check.php
@@ -35,6 +35,8 @@ $settings = $config['installedpackages']['squidcache']['config'][0];
if ($settings['harddisk_cache_system'] != "null"){
$cachedir =($settings['harddisk_cache_location'] ? $settings['harddisk_cache_location'] : '/var/squid/cache');
$swapstate = $cachedir . '/swap.state';
+ if (!file_exists($swapstate))
+ return;
$disktotal = disk_total_space(dirname($cachedir));
$diskfree = disk_free_space(dirname($cachedir));
$diskusedpct = round((($disktotal - $diskfree) / $disktotal) * 100);