network/elemental-ircd: Fix logrotate script

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Robby Workman 2021-07-16 00:13:15 -05:00 committed by Willy Sudiarto Raharjo
parent 7c8ad5caee
commit 7fe11fcfa4
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 6 additions and 1 deletions

View file

@ -33,6 +33,7 @@ TAG=${TAG:-_SBo}
IRCD_UID=${IRCD_UID:-315}
IRCD_GID=${IRCD_GID:-315}
IRCD_UNAME=${IRCD_UNAME:-elemental-ircd}
IRCD_GNAME=${IRCD_GNAME:-elemental-ircd}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@ -126,7 +127,10 @@ sed -e "s/@USER@/$IRCD_UNAME/" $CWD/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM.new
# Copy logrotate script into /etc/logrotate.d
mkdir -p $PKG/etc/logrotate.d
cat $CWD/$PRGNAM.logrotate > $PKG/etc/logrotate.d/$PRGNAM.new
sed \
-e "s,@IRCD_UNAME@,$IRCD_UNAME,g" \
-e "s,@IRCD_GNAME@,$IRCD_GNAME,g" \
$CWD/$PRGNAM.logrotate > $PKG/etc/logrotate.d/$PRGNAM.new
# Copy slackware-specific example conf to /etc/elemental-ircd
mkdir -p $PKG/etc/$PRGNAM

View file

@ -1,6 +1,7 @@
/var/log/elemental-ircd/* {
daily
rotate 7
create 0644 @IRCD_UNAME@ @IRCD_GNAME@
copytruncate
delaycompress
compress