[Pkg-awstats-commits] [SCM] awstats Debian packaging branch, master, updated. debian/7.0_dfsg-6-8-g03cea6f

Sergey B Kirpichev skirpichev at gmail.com
Wed Jun 13 18:39:16 UTC 2012


The following commit has been merged in the master branch:
commit cdf44857af06a4642975b27e2e03aec97ae204e2
Author: Sergey B Kirpichev <skirpichev at gmail.com>
Date:   Wed Jun 13 21:43:30 2012 +0400

    Revert "Improve script for post-rotation log scanning"
    
    This reverts commit 67b8b6a945861075a8a56054e4e8fbfaf414bb73.

diff --git a/debian/post-logrotate.sh b/debian/post-logrotate.sh
index 8eca8df..bedd683 100755
--- a/debian/post-logrotate.sh
+++ b/debian/post-logrotate.sh
@@ -18,25 +18,12 @@
 #
 #    You should have received a copy of the GNU General Public License
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-#  NOTES:
-#
-#   * Script should typically be called as a postrotate action
-#     from logrotate
-#
-#   * Use the nosharedscripts setting in logrotate config
-#
-#   * The script only acts on files that have a name like access.log.1
-#     and silently ignores other filenames (like error.log.1) in
-#     case they are passed by mistake.  This can be tuned with the
-#     ACCESS_LOG parameter below
 
 set -e
 
 DEFAULT=/etc/default/awstats
 AWSTATS=/usr/lib/cgi-bin/awstats.pl
 ERRFILE=`mktemp --tmpdir awstats.XXXXXXXXXX`
-ACCESS_LOG=access.log
 
 trap 'rm -f $ERRFILE' INT QUIT TERM EXIT
 
@@ -67,8 +54,9 @@ fi
 VHOST=`echo $VHOST_LOG | cut -d/ -f5`
 FNAME=`echo $VHOST_LOG | cut -d/ -f6`
 
-if [ "$FNAME" != ${ACCESS_LOG}.1 ];
+if [ "$FNAME" != access.log.1 ];
 then
+  echo "Unexpected filename passed to $0: $1"
   exit 0
 fi
 
@@ -85,7 +73,7 @@ echo "$AWSTATS_CONF"
 if ! nice -n $AWSTATS_NICE \
   ${AWSTATS} \
      -config=${VHOST} \
-     -LogFile=${VHOST_LOG} \
+     -LogFile=${FNAME} \
      -update  \
     >$ERRFILE 2>&1
 then

-- 
awstats Debian packaging



More information about the Pkg-awstats-commits mailing list