fix monthly cron name and add purging dns cache
authorClinton Ebadi <clinton@unknownlamer.org>
Fri, 20 Mar 2015 22:59:47 +0000 (18:59 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Fri, 20 Mar 2015 22:59:47 +0000 (18:59 -0400)
The webalizer dns cache never removes old records (but will update IPs
when seen again after the configured TTL). We have to run an external
tool to remove stale records. Purge all but ten days, webalizer won't
use any > 7 days anyway with our configuration.

debian/hcoop-webalizer.cron.monthly [moved from debian/hcoop-webalizer-config.cron.monthly with 72% similarity]

similarity index 72%
rename from debian/hcoop-webalizer-config.cron.monthly
rename to debian/hcoop-webalizer.cron.monthly
index 8a1a601..915d8e8 100644 (file)
@@ -1,4 +1,8 @@
 #!/bin/sh
+
 # Grab monthly Webalizer GeoDB update
 
 wget http://archive.mgm51.com/mirrors/webalizer-files/geodb/geodb-latest.tgz -O - | (cd /var/cache/webalizer/ && tar -xzf -)
+
+# Purge DNS cache
+wcmgr -p10 /var/cache/webalizer/dns_cache.db