From 3492ee4e32a1dd2cafa982c6603b7f8afe14564d Mon Sep 17 00:00:00 2001 From: Ken Neighbors Date: Wed, 28 Apr 2010 22:31:40 -0700 Subject: Add option to disable nightly generation of static html reports. --- debian/README.Debian | 1 + debian/buildstatic.sh | 5 +++++ debian/default/awstats | 4 ++++ 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/debian/README.Debian b/debian/README.Debian index d5a9a1e..ed8b69f 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -8,6 +8,7 @@ Do the following for a simple setup of a single website with Apache 2.x: * Edit /etc/logrotate.d/apache2 to permit www-data access to logfiles * copy /usr/share/doc/awstats/examples/apache.conf to /etc/apache2/conf.d/ + * edit /etc/default/awstats to enable nightly build of static html reports The above is _NOT_ supported or recommended! Please read the rest of this document instead... diff --git a/debian/buildstatic.sh b/debian/buildstatic.sh index 9f41cbc..ca09cc7 100755 --- a/debian/buildstatic.sh +++ b/debian/buildstatic.sh @@ -14,6 +14,11 @@ BUILDSTATICPAGES=/usr/share/awstats/tools/awstats_buildstaticpages.pl [ -f $AWSTATS -a -f $BUILDSTATICPAGES ] || exit 1 [ -r "$DEFAULT" ] && . "$DEFAULT" +ENABLE=${AWSTATS_ENABLE_BUILDSTATICPAGES:-no} +if [ "$ENABLE" != "yes" ]; then + exit 0 +fi + cd /etc/awstats TMPFILE=`mktemp /tmp/awstats.XXXXXXXXXX` diff --git a/debian/default/awstats b/debian/default/awstats index 3785ea3..d8830cc 100644 --- a/debian/default/awstats +++ b/debian/default/awstats @@ -1,5 +1,9 @@ # AWStats configuration options +# This variable controls whether to create static html reports every +# night in /var/cache/awstats/. Set to "yes" or "no". +AWSTATS_ENABLE_BUILDSTATICPAGES="no" + # This variable control the language of all static html reports. Set # one to appropriate two-letter language code (default to en). #AWSTATS_LANG=ru -- 1.5.6.5