aboutsummaryrefslogtreecommitdiffstats
path: root/config/lightsquid
diff options
context:
space:
mode:
Diffstat (limited to 'config/lightsquid')
-rw-r--r--config/lightsquid/lightsquid.inc19
1 files changed, 9 insertions, 10 deletions
diff --git a/config/lightsquid/lightsquid.inc b/config/lightsquid/lightsquid.inc
index 5fd89470..4b31bc30 100644
--- a/config/lightsquid/lightsquid.inc
+++ b/config/lightsquid/lightsquid.inc
@@ -294,16 +294,15 @@ function lightsquid_resync() {
$ifmgr = $ifmgr . $realif[0] . ";";
}
- # ? delete ?
- $config['installedpackages']['squidcache']['config'][0]['ext_cachemanager'] = $ifmgr;
- # now right
- $config['installedpackages']['squidnac']['config'][0]['ext_cachemanager'] = $ifmgr;
-
- write_config();
- if (function_exists('squid_resync')) {
- squid_resync();
- }
- else update_log("Function 'squid_resync' not found.");
+ /* Only save and resync if we're actually making any changes. */
+ if (strpos($config['installedpackages']['squidnac']['config'][0]['ext_cachemanager'], $ifmgr) === FALSE) {
+ $config['installedpackages']['squidnac']['config'][0]['ext_cachemanager'] = $ifmgr;
+ write_config();
+ if (function_exists('squid_resync'))
+ squid_resync();
+ else
+ update_log("Function 'squid_resync' not found.");
+ }
}
}