From 35a5368e8451ee8228a10c96b5633373affd1015 Mon Sep 17 00:00:00 2001 From: Nishant Limbachia Date: Sun, 10 Jul 2011 10:21:20 -0300 Subject: network/amavisd-new: Updated for version 2.6.6. Signed-off-by: Niels Horn --- network/amavisd-new/README | 11 +++++- network/amavisd-new/README.SBo | 2 +- network/amavisd-new/amavisd-new.SlackBuild | 28 +++++--------- network/amavisd-new/amavisd-new.info | 8 ++-- network/amavisd-new/amavisd-new.logrotate | 8 ++++ network/amavisd-new/amavisd.logrotate | 8 ---- network/amavisd-new/doinst.sh | 3 +- network/amavisd-new/rc.amavisd | 61 ----------------------------- network/amavisd-new/rc.amavisd-new | 62 ++++++++++++++++++++++++++++++ network/amavisd-new/slack-desc | 2 +- 10 files changed, 97 insertions(+), 96 deletions(-) create mode 100644 network/amavisd-new/amavisd-new.logrotate delete mode 100644 network/amavisd-new/amavisd.logrotate delete mode 100644 network/amavisd-new/rc.amavisd create mode 100644 network/amavisd-new/rc.amavisd-new (limited to 'network/amavisd-new') diff --git a/network/amavisd-new/README b/network/amavisd-new/README index 4af4769869..29e0a20246 100644 --- a/network/amavisd-new/README +++ b/network/amavisd-new/README @@ -1,4 +1,13 @@ amavisd-new is an interface between message transfer agent (MTA) and one or more content checkers: virus scanners, SpamAssassin and/or dkim signing. -Please refer to README.SBo for detailed instructions and dependencies. +Please refer to README.SBo for detailed instructions and dependencies before +running the build script. + +Script and package changes introduced in version >= 2.6.6 +1. logrotate file is renamed amavisd-new. +2. rc script is renamed to rc.amavisd-new +3. logfile in the logrotate script is renamed to amavisd-new.log. Make sure + you change the logfile in the amavisd.conf file and rename the log file. + Look for, $LOGFILE directive in the configuration file. +4. Remember to update your rc.local and rc.local_shutdown scripts accordingly. diff --git a/network/amavisd-new/README.SBo b/network/amavisd-new/README.SBo index 3c6e95837d..bf8b7c8aab 100644 --- a/network/amavisd-new/README.SBo +++ b/network/amavisd-new/README.SBo @@ -54,7 +54,7 @@ SETUP: 2. Make sure you have write perms for amavis group to amavis home (in this case, /var/lib/amavis) -3. Create /var/log/amavisd.log file, change perms to allow write access +3. Create /var/log/amavisd-new.log file, change perms to allow write access to amavisd user/group. 4. Add amavis user to clamav group and set "AllowSupplementaryGroups yes" diff --git a/network/amavisd-new/amavisd-new.SlackBuild b/network/amavisd-new/amavisd-new.SlackBuild index aeae5bf1d4..2676af027f 100644 --- a/network/amavisd-new/amavisd-new.SlackBuild +++ b/network/amavisd-new/amavisd-new.SlackBuild @@ -3,7 +3,8 @@ # Slackware Package Build Script for amavisd-new # Home Page http://www.ijs.si/software/amavisd/ -# Copyright (c) 2009-2010, Nishant Limbachia, Hoffman Estates, IL, USA (nishant _AT_ mnspace _DOT_ net) +# Copyright (c) 2009-2011, Nishant Limbachia, Hoffman Estates, IL, USA +# # All rights reserved. # Redistribution and use of this script, with or without modification, is @@ -25,9 +26,9 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM="amavisd-new" -VERSION="2.6.4" -ARCH=noarch -BUILD=${BUILD:-2} +VERSION=${VERSION:-2.6.6} +ARCH="noarch" +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -37,17 +38,6 @@ OUTPUT=${OUTPUT:-/tmp} set -e -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -fi - # Create system user and group for amavisd-new if ! grep -q ^amavis: /etc/group ; then echo " Please add a dedicated group to run amavisd-new" @@ -71,8 +61,8 @@ GROUP=${GROUP:-amavis} AMAVIS_HOME=${AMAVIS_HOME:-/var/lib/amavis} QUARANTINE_DIR=${QUARANTINE_DIR:-$AMAVIS_HOME/quarantine} -DOCS="RELEASE_NOTES LICENSE AAAREADME.first INSTALL TODO - amavisd*.conf LDAP* test-messages README_FILES" +DOCS="AAAREADME.first INSTALL TODO amavisd*.conf* LDAP* + RELEASE_NOTES LICENSE README_FILES test-messages" rm -fr $TMP/$PRGNAM-$VERSION $PKG mkdir -p $TMP $PKG $OUTPUT @@ -114,10 +104,10 @@ cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild ### install rc script -install -m 0755 -D $CWD/rc.amavisd $PKG/etc/rc.d/rc.amavisd.new +install -m 0755 -D $CWD/rc.amavisd-new $PKG/etc/rc.d/rc.amavisd-new.new ### install logrotate script -install -D -m 0644 $CWD/amavisd.logrotate $PKG/etc/logrotate.d/amavisd +install -D -m 0644 $CWD/amavisd-new.logrotate $PKG/etc/logrotate.d/amavisd-new.new ### putting slack-desc and doinst.sh in place mkdir -p $PKG/install diff --git a/network/amavisd-new/amavisd-new.info b/network/amavisd-new/amavisd-new.info index 2601967f75..34906b3bde 100644 --- a/network/amavisd-new/amavisd-new.info +++ b/network/amavisd-new/amavisd-new.info @@ -1,10 +1,10 @@ PRGNAM="amavisd-new" -VERSION="2.6.4" +VERSION="2.6.6" HOMEPAGE="http://www.ijs.si/software/amavisd/" -DOWNLOAD="http://www.ijs.si/software/amavisd/amavisd-new-2.6.4.tar.gz" -MD5SUM="03d31657f14cd64c1cb38786214234b4" +DOWNLOAD="http://www.ijs.si/software/amavisd/amavisd-new-2.6.6.tar.gz" +MD5SUM="6bddb725115c2682110b82d41494df73" DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="Nishant Limbachia" EMAIL="nishant@mnspace.net" -APPROVED="dsomero" +APPROVED="Niels Horn" diff --git a/network/amavisd-new/amavisd-new.logrotate b/network/amavisd-new/amavisd-new.logrotate new file mode 100644 index 0000000000..8db443ff19 --- /dev/null +++ b/network/amavisd-new/amavisd-new.logrotate @@ -0,0 +1,8 @@ +/var/log/amavisd-new.log { + rotate 5 + notifempty + missingok + size 100k + nocompress + copytruncate +} diff --git a/network/amavisd-new/amavisd.logrotate b/network/amavisd-new/amavisd.logrotate deleted file mode 100644 index c7f5342714..0000000000 --- a/network/amavisd-new/amavisd.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -/var/log/amavisd.log { - rotate 5 - notifempty - missingok - size 1M - nocompress - copytruncate -} \ No newline at end of file diff --git a/network/amavisd-new/doinst.sh b/network/amavisd-new/doinst.sh index 0d8d442872..637ab6bc82 100644 --- a/network/amavisd-new/doinst.sh +++ b/network/amavisd-new/doinst.sh @@ -18,5 +18,6 @@ if [ -e etc/rc.d/rc.amavisd-new ]; then mv etc/rc.d/rc.amavisd-new.new.incoming etc/rc.d/rc.amavisd-new.new fi -config etc/rc.d/rc.amavisd.new +config etc/rc.d/rc.amavisd-new.new config etc/amavisd.conf.new +config etc/logrotate.d/amavisd-new.new diff --git a/network/amavisd-new/rc.amavisd b/network/amavisd-new/rc.amavisd deleted file mode 100644 index b30ddd9c26..0000000000 --- a/network/amavisd-new/rc.amavisd +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2008-2010, Nishant Limbachia, Hoffman Estates, IL, USA - -# /etc/rc.d/rc.amavisd -# start|stop|restart|status for amavisd-new - -# For automatic startup at boot, call this script from rc.local - -PIDFILE=/var/run/amavis/amavisd.pid - -amavisd_start() { - if [ -x /etc/rc.d/rc.amavisd ]; then - if [ -f $PIDFILE ]; then - echo "amavisd-new daemon running with PID: $(cat $PIDFILE)" - echo "try /etc/rc.d/rc.amavisd stop|restart" - echo "" - exit 1 - else - echo "Starting amavisd-new daemon" - /usr/sbin/amavisd start - fi - fi -} - -amavisd_stop() { - if [ -f $PIDFILE ]; then - echo "Stopping amavisd-new daemon" - /usr/sbin/amavisd stop - else - echo "amavisd-new daemon is not running" - fi -} - -amavisd_restart() { - echo "Restarting amavisd-new daemon" - /usr/sbin/amavisd reload -} - -amavisd_status() { - echo "amavisd-new daemon running with PID: $(cat $PIDFILE)" -} - -case "$1" in -'start') - amavisd_start - ;; -'stop') - amavisd_stop - ;; -'restart') - amavisd_restart - ;; -'status') - amavisd_status - ;; -*) - echo "USAGE: $0 start|stop|restart|status" - exit 1 - ;; -esac diff --git a/network/amavisd-new/rc.amavisd-new b/network/amavisd-new/rc.amavisd-new new file mode 100644 index 0000000000..9d0de3dd68 --- /dev/null +++ b/network/amavisd-new/rc.amavisd-new @@ -0,0 +1,62 @@ +#!/bin/sh + +# Copyright (c) 2008-2011, Nishant Limbachia, Hoffman Estates, IL, USA +# +# /etc/rc.d/rc.amavisd +# start|stop|restart|status for amavisd-new +# For automatic start at boot up, call this script from rc.local + +PIDFILE=/var/run/amavis/amavisd.pid + +amavisd_start() { + if [ -x /etc/rc.d/rc.amavisd-new ]; then + if [ -f $PIDFILE ]; then + echo "amavisd-new daemon running with PID: $(cat $PIDFILE)" + echo "try /etc/rc.d/rc.amavisd-new stop|restart" + echo "" + exit 1 + else + echo "Starting amavisd-new daemon" + /usr/sbin/amavisd start + fi + fi +} + +amavisd_stop() { + if [ -f $PIDFILE ]; then + echo "Stopping amavisd-new daemon" + /usr/sbin/amavisd stop + else + echo "amavisd-new daemon is not running" + fi +} + +amavisd_restart() { + echo "Restarting amavisd-new daemon" + amavisd_stop + sleep 5 + amavisd_start +} + +amavisd_status() { + echo "amavisd-new daemon running with PID: $(cat $PIDFILE)" +} + +case "$1" in +'start') + amavisd_start + ;; +'stop') + amavisd_stop + ;; +'restart') + amavisd_restart + ;; +'status') + amavisd_status + ;; +*) + echo "USAGE: $0 start|stop|restart|status" + exit 1 + ;; +esac diff --git a/network/amavisd-new/slack-desc b/network/amavisd-new/slack-desc index 200469cd79..c831ed2df9 100644 --- a/network/amavisd-new/slack-desc +++ b/network/amavisd-new/slack-desc @@ -5,7 +5,7 @@ # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler------------------------------------------------------| amavisd-new: amavisd-new (interface between postfix content filters) amavisd-new: amavisd-new: amavisd-new is a high-performance interface between mailer (MTA) -- cgit v1.2.3