[Pkg-awstats-commits] [SCM] awstats Debian packaging branch, master, updated. debian/6.9.dfsg-1-124-ga3ad455

Sergey B Kirpichev skirpichev at gmail.com
Sat May 30 11:06:45 UTC 2009


The following commit has been merged in the master branch:
commit 916b0985afb61e7fec23a43bed582955dce1654c
Author: Sergey B Kirpichev <skirpichev at gmail.com>
Date:   Fri May 22 14:27:42 2009 +0400

    Use update.sh script in crontab

diff --git a/debian/awstats.cron.d b/debian/awstats.cron.d
index 0fb8fe3..695a499 100644
--- a/debian/awstats.cron.d
+++ b/debian/awstats.cron.d
@@ -1 +1 @@
-*/10 * * * * www-data [ -x /usr/lib/cgi-bin/awstats.pl ] && /usr/lib/cgi-bin/awstats.pl -config=awstats -update >/dev/null
+*/10 * * * * www-data /usr/share/awstats/tools/update.sh
diff --git a/debian/awstats.install b/debian/awstats.install
index 0aa6fe6..a8f224d 100644
--- a/debian/awstats.install
+++ b/debian/awstats.install
@@ -5,5 +5,6 @@ wwwroot/cgi-bin/lang/*		usr/share/awstats/lang/
 wwwroot/cgi-bin/lib/*		usr/share/awstats/lib/
 wwwroot/cgi-bin/plugins/*.pm	usr/share/awstats/plugins/
 wwwroot/icon/*			usr/share/awstats/icon/
+debian/update.sh	usr/share/awstats/tools/
 
 debian/icons/firefox.png			usr/share/awstats/icon/browser/
diff --git a/debian/examples/awstats-update b/debian/examples/awstats-update
deleted file mode 100644
index fd5859a..0000000
--- a/debian/examples/awstats-update
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-[ -f /etc/awstats/awstats.conf ] && /usr/lib/cgi-bin/awstats.pl -config=awstats -update >/dev/null
-for cfg in `find /etc/awstats -name 'awstats.*.conf' -printf '%f\n' | sed 's/^awstats\.\(.*\)\.conf/\1/'`; do
-    /usr/lib/cgi-bin/awstats.pl -config=$cfg -update >/dev/null
-done
diff --git a/debian/examples/awstats-update.8 b/debian/examples/awstats-update.8
deleted file mode 100644
index 45cc95e..0000000
--- a/debian/examples/awstats-update.8
+++ /dev/null
@@ -1,29 +0,0 @@
-.\"                                      Hey, EMACS: -*- nroff -*-
-.\" First parameter, NAME, should be all caps
-.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
-.\" other parameters are allowed: see man(7), man(1)
-.TH AWSTATS-UPDATE 8 "August 2001"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh        disable hyphenation
-.\" .hy        enable hyphenation
-.\" .ad l      left justify
-.\" .ad b      justify to both left and right margins
-.\" .nf        disable filling
-.\" .fi        enable filling
-.\" .br        insert line break
-.\" .sp <n>    insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
-.SH NAME
-awstats-update \- update awstats statistics
-.SH SYNOPSIS
-.B awstats-update
-.SH DESCRIPTION
-This program is called by cron jobs and in webserver's pre-rotate
-script to update the statistics of AwStats, which is a featureful
-web server log analyzer. If you don't know what you do, you shouldn't
-use this program, it is used by your system.
-.SH AUTHOR
-This manual page was written by RISKO Gergely <risko at debian.org>,
-for the Debian GNU/Linux system (but may be used by others).
diff --git a/debian/rules b/debian/rules
index e25902c..fa3a95f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -37,9 +37,9 @@ DEB_UPSTREAM_REPACKAGE_EXCLUDE = wwwroot/icon/browser/firefox.png
 DEB_INSTALL_CHANGELOGS_ALL = docs/awstats_changelog.txt
 DEB_INSTALL_DOCS_ALL = README.TXT
 
-awstats_example_scripts = $(wildcard tools/*.pl) $(wildcard debian/examples/*.sh) debian/examples/awstats-update
+awstats_example_scripts = $(wildcard tools/*.pl) $(wildcard debian/examples/*.sh)
 
-DEB_INSTALL_EXAMPLES_awstats = $(awstats_example_scripts) debian/examples/apache.conf debian/examples/awstats-update.8 wwwroot/cgi-bin/awstats.model.conf wwwroot/cgi-bin/plugins/example/* wwwroot/css wwwroot/js tools/xslt
+DEB_INSTALL_EXAMPLES_awstats = $(awstats_example_scripts) debian/examples/apache.conf wwwroot/cgi-bin/awstats.model.conf wwwroot/cgi-bin/plugins/example/* wwwroot/css wwwroot/js tools/xslt
 DEB_COMPRESS_EXCLUDE = $(notdir $(awstats_example_scripts)) awstats.ico
 
 pre-build::
diff --git a/debian/update.sh b/debian/update.sh
new file mode 100644
index 0000000..642dbc0
--- /dev/null
+++ b/debian/update.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+##
+## update.sh, written by Sergey B Kirpchev <skirpichev at gmail.com>
+##
+## Update AWStats data for all configs, awstats.*.conf (Debian specific)
+##
+DEFAULT=/etc/default/awstats
+AWSTATS=/usr/lib/cgi-bin/awstats.pl
+
+[ -f $AWSTATS ] || exit 1
+
+cd /etc/awstats
+
+for c in `ls -1 awstats.*.conf | sed 's/^awstats\.\(.*\)\.conf/\1/'`
+do
+  $AWSTATS -config=$c -update
+done >/dev/null

-- 
awstats Debian packaging



More information about the Pkg-awstats-commits mailing list