tags 847314 patch thanks
I've implemented patch on top of current git master which I tested on stretch.
diff --git a/debian/default/awstats b/debian/default/awstats index cf06f7d..bb0b857 100644 --- a/debian/default/awstats +++ b/debian/default/awstats @@ -17,3 +17,10 @@ AWSTATS_LANG="en" # This variable controls whether to run regular cron jobs for awstats. Set # to "yes" or "no" (default to "yes"). AWSTATS_ENABLE_CRONTABS="yes" + +# This variable controls how statistics are partitioned. Set "month", "day", +# "hour" or a combination as "month day". If variable is not set, default +# AWStats database break is used (month). Set additional CGI arguments as +# "&databasebreak=hour&day=3&hour=14 to access summary of the specific hour +# for the specific day. +AWSTATS_DATABASE_BREAKS= diff --git a/debian/update.sh b/debian/update.sh index c83bfeb..47651db 100755 --- a/debian/update.sh +++ b/debian/update.sh @@ -28,12 +28,16 @@ for c in `/bin/ls -1 awstats.*.conf 2>/dev/null | \ /bin/sed 's/^awstats\.\(.*\)\.conf/\1/'` \ `[ -f /etc/awstats/awstats.conf ] && echo awstats` do - if ! nice -n $AWSTATS_NICE $AWSTATS \ + for b in ${AWSTATS_DATABASE_BREAKS:-""} + do + if ! nice -n $AWSTATS_NICE $AWSTATS \ + ${b:+-databasebreak=${b}} \ -config=$c \ -update >$ERRFILE 2>&1 - then - echo "Error while processing" \ - "/etc/awstats/awstats$(test $c != awstats && echo .$c).conf" >&2 - cat $ERRFILE >&2 # an error occurred - fi + then + echo "Error while processing" \ + "/etc/awstats/awstats$(test $c != awstats && echo .$c).conf" >&2 + cat $ERRFILE >&2 # an error occurred + fi + done done