[tomcat8] 01/01: Compress and remove the access log files with a .txt extension (Closes: #845661)
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Thu Dec 1 10:54:03 UTC 2016
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch experimental
in repository tomcat8.
commit 740422a83e7760fb478dfbac791d1272ae574d16
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Thu Dec 1 11:39:56 2016 +0100
Compress and remove the access log files with a .txt extension (Closes: #845661)
---
debian/changelog | 2 ++
debian/tomcat8.cron.daily | 20 ++++++++++++--------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 53a34d5..afe55fa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ tomcat8 (8.5.8-2) UNRELEASED; urgency=medium
* Team upload.
* The tomcat8 user is no longer removed when the package is purged
(Closes: #845385)
+ * Compress and remove the access log files with a .txt extension
+ (Closes: #845661)
* Added the delaycompress option to the logrotate configuration
of catalina.out (Closes: #843135)
* Set the proper permissions for /etc/tomcat8/jaspic-providers.xml
diff --git a/debian/tomcat8.cron.daily b/debian/tomcat8.cron.daily
index a6b0b74..c26b33a 100644
--- a/debian/tomcat8.cron.daily
+++ b/debian/tomcat8.cron.daily
@@ -2,7 +2,7 @@
NAME=tomcat8
DEFAULT=/etc/default/$NAME
-LOGEXT=log
+LOGEXT="log txt"
# The following variables can be overwritten in $DEFAULT
@@ -19,12 +19,16 @@ if [ -f "$DEFAULT" ]; then
fi
if [ -d /var/log/$NAME ]; then
- if [ $LOGFILE_COMPRESS = 1 ]; then
- find /var/log/$NAME/ -name \*.$LOGEXT -daystart -mtime +0 -print0 \
- | xargs --no-run-if-empty -0 gzip -9
- LOGEXT=log.gz
- fi
+ for EXT in $LOGEXT; do
+ # Compress the log files
+ if [ $LOGFILE_COMPRESS = 1 ]; then
+ find /var/log/$NAME/ -name \*.$EXT -daystart -mtime +0 -print0 \
+ | xargs --no-run-if-empty -0 gzip -9
+ EXT=$EXT.gz
+ fi
- find /var/log/$NAME/ -name \*.$LOGEXT -mtime +$LOGFILE_DAYS -print0 \
- | xargs --no-run-if-empty -0 rm --
+ # Remove the log files older than LOGFILE_DAYS
+ find /var/log/$NAME/ -name \*.$EXT -mtime +$LOGFILE_DAYS -print0 \
+ | xargs --no-run-if-empty -0 rm --
+ done
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/tomcat8.git
More information about the pkg-java-commits
mailing list