diff options
author | Eric Hameleers <alien@slackware.com> | 2006-03-11 13:18:23 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2006-03-11 13:18:23 +0000 |
commit | b672914582d2e224604e4ceb6425883c12a9d707 (patch) | |
tree | bb2e9a99d67c5ad77096e98bb0b5bfc28762c465 /icecast | |
parent | 64fe959bffc1b951ef2a2fdb991e53a1beb2160f (diff) | |
download | asb-b672914582d2e224604e4ceb6425883c12a9d707.tar.gz asb-b672914582d2e224604e4ceb6425883c12a9d707.tar.xz |
Added a logrotate script
Diffstat (limited to 'icecast')
-rwxr-xr-x | icecast/build/ices.SlackBuild | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/icecast/build/ices.SlackBuild b/icecast/build/ices.SlackBuild index acfbd42d..6098368d 100755 --- a/icecast/build/ices.SlackBuild +++ b/icecast/build/ices.SlackBuild @@ -13,6 +13,8 @@ # Changelog: # 0.4-1: 20/oct/2004 by Eric Hameleers # Initial build. +# 0.4-2: 11/mar/2006 by Eric Hameleers +# Added logrotate script. # # -------------------------------------------------------------------------- # @@ -25,7 +27,7 @@ fi PRGNAM=ices VERSION=0.4 ARCH=i486 -BUILD=1 +BUILD=2 PKG=$TMP/package-$PRGNAM @@ -109,6 +111,25 @@ chmod -R -w $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/install cat <<EOINS > $PKG/install/doinst.sh +# Handle the incoming configuration files: +config() { + for infile in \$1; do + NEW="\$infile" + OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`" + # If there's no config file by that name, mv it over: + if [ ! -r \$OLD ]; then + mv \$NEW \$OLD + elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then + # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... + done +} + +# Take care of the logrotate script +config etc/logrotate.d/ices.new + #Add the '${icegroup}' group if it doesn't exist already groupadd ${icegroup} 2> /dev/null #Add the '${iceuser}' user if it doesn't exist already |