summaryrefslogtreecommitdiffstats
path: root/network/squid
diff options
context:
space:
mode:
author Robby Workman <rworkman@slackbuilds.org>2012-09-11 20:38:05 -0500
committer Robby Workman <rworkman@slackbuilds.org>2012-09-11 23:53:42 -0500
commit8ac78dc4bcdd624e2aa99dd611e8022b388b716a (patch)
treee5edbef6a0a009b74d0bb150e852f089739ecec0 /network/squid
parent8ed760477b9475d7001944adf09252e9614fa3b2 (diff)
downloadslackbuilds-8ac78dc4bcdd624e2aa99dd611e8022b388b716a.tar.gz
slackbuilds-8ac78dc4bcdd624e2aa99dd611e8022b388b716a.tar.xz
network/squid: Fixed logrotate script (added "su" directive)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/squid')
-rw-r--r--network/squid/squid.SlackBuild8
-rw-r--r--network/squid/squid.logrotate1
2 files changed, 4 insertions, 5 deletions
diff --git a/network/squid/squid.SlackBuild b/network/squid/squid.SlackBuild
index 4b4349e874..f28cacd2e9 100644
--- a/network/squid/squid.SlackBuild
+++ b/network/squid/squid.SlackBuild
@@ -25,7 +25,7 @@
PRGNAM=squid
VERSION=${VERSION:-3.1.20}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -113,10 +113,8 @@ chown root:root $PKG/usr/doc/$PRGNAM-$VERSION/*
mkdir -p $PKG/etc/{logrotate.d,rc.d}
cat $CWD/rc.squid > $PKG/etc/rc.d/rc.squid.new
-# Note that the .new file left hanging around in /etc/logrotate.d/ will
-# probably/surely make cron'd logrotations fail, but not installing it
-# as .new here will clobber a potentially custom file.
-cat $CWD/squid.logrotate > $PKG/etc/logrotate.d/squid.new
+sed -e "s,@USER@,$SQUIDUSER," -e "s,@GROUP@,$SQUIDGROUP," $CWD/squid.logrotate \
+ > $PKG/etc/logrotate.d/squid.new
mv $PKG/etc/squid/mime.conf $PKG/etc/squid/mime.conf.new
mv $PKG/etc/squid/cachemgr.conf $PKG/etc/squid/cachemgr.conf.new
diff --git a/network/squid/squid.logrotate b/network/squid/squid.logrotate
index cad527de36..eeca36223f 100644
--- a/network/squid/squid.logrotate
+++ b/network/squid/squid.logrotate
@@ -7,6 +7,7 @@
# reopen squid.log, effectively using the new logfile. The old logfile
# (squid.log.1) will be compressed by logrotate's next invocation.
/var/log/squid/*.log {
+ su @USER@ @GROUP@
weekly
rotate 5
compress