Bug Fixes debian/1
authorClinton Ebadi <clinton@unknownlamer.org>
Tue, 8 Apr 2014 07:44:11 +0000 (03:44 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Tue, 8 Apr 2014 09:59:14 +0000 (05:59 -0400)
* Actually run webbw
* Use k5start in background mode so file system checks succeed
* Actually install cron job
* Adapt configuration defaults for hcoop

debian/changelog
debian/control
debian/hcoop-webalizer-config.dirs [new file with mode: 0644]
debian/hcoop-webalizer-config.hide
debian/hcoop-webalizer-config.transform [new file with mode: 0644]
debian/hcoop-webalizer.cron.daily
debian/rules

index 81a61e5..69c8cb8 100644 (file)
@@ -1,3 +1,9 @@
+hcoop-webalizer-config (1) squeeze; urgency=medium
+
+  * Actually install cron job
+
+ -- Clinton Ebadi <clinton@unknownlamer.org>  Tue, 08 Apr 2014 03:43:49 -0400
+
 hcoop-webalizer-config (0) squeeze; urgency=low
 
   * Initial Release.
index a88ca30..94eca9e 100644 (file)
@@ -2,7 +2,7 @@ Source: hcoop-webalizer-config
 Section: hcoop-config/web
 Priority: optional
 Maintainer: Clinton Ebadi <clinton@unknownlamer.org>
-Build-Depends: debhelper (>= 8.0.0), config-package-dev (>= 5.1.0)
+Build-Depends: debhelper (>= 8.0.0), config-package-dev (>= 5.1.0), webalizer
 Standards-Version: 3.9.4
 Homepage: http://hcoop.net
 Vcs-Git: git://git.hcoop.net/git/hcoop/debian/hcoop-webalizer-config.git
diff --git a/debian/hcoop-webalizer-config.dirs b/debian/hcoop-webalizer-config.dirs
new file mode 100644 (file)
index 0000000..c41cb80
--- /dev/null
@@ -0,0 +1 @@
+/var/cache/webalizer
\ No newline at end of file
index 4c2fa2d..6a9afa7 100644 (file)
@@ -1 +1 @@
-/etc/cron.daily/webalizer.hcoop
\ No newline at end of file
+/etc/cron.daily/webalizer
\ No newline at end of file
diff --git a/debian/hcoop-webalizer-config.transform b/debian/hcoop-webalizer-config.transform
new file mode 100644 (file)
index 0000000..63bf8cf
--- /dev/null
@@ -0,0 +1 @@
+/etc/webalizer/webalizer.conf.hcoop </etc/webalizer/webalizer.conf.sample sed -e 's/^#\?LogFile\s.*$//' -e 's/^#\?Incremental\s.*$/Incremental yes/' -e 's/^#\?DNSCache\s.*$/DNSCache \/var\/cache\/webalizer\/dns_cache.db/'
\ No newline at end of file
index 14987c4..1d019fb 100644 (file)
@@ -9,15 +9,18 @@
 
 WEBALIZER=/usr/bin/webalizer
 WEBALIZER_CONFDIR=/afs/hcoop.net/common/etc/domtool/webalizer/config
+WEBBWSTATSDIR=/afs/hcoop.net/user/h/hc/hcoop/portal-root/etc/stats
 
 [ -x ${WEBALIZER} ] || exit 0;
 [ -d ${WEBALIZER_CONFDIR} ] || exit 0;
 
-WEBALIZER="/usr/bin/k5start -U -K 300 -t -f /etc/keytabs/service/webalizer ${WEBALIZER}"
+/usr/bin/k5start -U -b -K 300 -t \
+    -p /var/run/webalizer-k5start.pid \
+    -f /etc/keytabs/service/webalizer
 
 #${WEBALIZER} -c /etc/webalizer/main.conf -Q || continue
 
-for i in ${WEBALIZER_CONFDIR}/*.conf; do
+for i in ${WEBALIZER_CONFDIR}/*/*.conf; do
   # exists ?
   [ -f $i ] || continue;
 
@@ -57,6 +60,14 @@ for i in ${WEBALIZER_CONFDIR}/*.conf; do
   fi;
 done;
 
+/usr/local/sbin/webbw   > $WEBBWSTATSDIR/webbw
+/usr/local/sbin/webbw 1 > $WEBBWSTATSDIR/webbw.last
+/usr/local/sbin/webbw 2 > $WEBBWSTATSDIR/webbw.last2
+
+
+[ -r /var/run/webalizer-k5start.pid ] && \
+        kill `cat /var/run/webalizer-k5start.pid `;
+
 # exit with webalizer's exit code
 exit $RET;
 
index 536409a..d7d553f 100755 (executable)
@@ -6,3 +6,6 @@
 
 %:
        dh $@ --with=config-package
+
+override_dh_installcron:
+       dh_installcron --name=hcoop-webalizer