Search
j0ke.net Open Build Service
>
Projects
>
server:mail
>
amavisd-new27
> rc.amavis
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File rc.amavis of Package amavisd-new27
#! /bin/sh # Copyright (c) 2003 SuSE Linux AG Nuernberg, Germany. # # Author: Carsten Hoeger <feedback@suse.de>, 2003 # # ### BEGIN INIT INFO # Provides: amavis # Required-Start: $remote_fs # Should-Start: $named clamd # Required-Stop: $null # Should-Stop: $null # Default-Start: 3 5 # Default-Stop: # Description: Start amavisd-new ### END INIT INFO AMAVISD_BIN=/usr/sbin/amavisd AMAVIS_MILTER_BIN=/usr/sbin/amavis-milter test -x $AMAVISD_BIN || exit 5 test -x $AMAVIS_MILTER_BIN || exit 5 test -s /etc/sysconfig/amavis && \ . /etc/sysconfig/amavis # First reset status of this service . /etc/rc.status rc_reset case "$1" in start) echo -n "Starting virus-scanner (amavisd-new):" $AMAVISD_BIN start if ! checkproc amavisd; then rc_failed 7 fi rc_status -v if [ "$AMAVIS_SENDMAIL_MILTER" == "yes" ]; then rc_reset echo -n "Starting amavis-milter:" startproc -u vscan $AMAVIS_MILTER_BIN -p local:/var/run/amavis/amavis-milter.sock > /dev/null 2>&1 rc_status -v fi ;; stop) echo -n "Shutting down virus-scanner (amavisd-new):" if checkproc amavisd; then rc_reset $AMAVISD_BIN stop else rc_reset fi rc_status -v if [ "$AMAVIS_SENDMAIL_MILTER" == "yes" ]; then rc_reset echo -n "Shutting down amavis-milter:" killproc -TERM $AMAVIS_MILTER_BIN rc_status -v fi ;; try-restart) $0 status >/dev/null && $0 restart rc_status ;; restart) $0 stop $0 start rc_status ;; force-reload) echo -n "Reload virus-scanner (amavisd-new)" $AMAVISD_BIN reload 2>/dev/null rc_status -v ;; reload) echo -n "Reload virus-scanner (amavisd-new)" $AMAVISD_BIN reload 2>/dev/null rc_status -v ;; status) echo -n "Checking for service amavis (amavisd-new):" checkproc -p /var/spool/amavis/amavisd.pid amavisd rc_status -v if [ "$AMAVIS_SENDMAIL_MILTER" == "yes" ]; then rc_reset echo -n "Checking for service amavis-milter:" checkproc $AMAVIS_MILTER_BIN rc_status -v fi ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" exit 1 esac # Inform the caller not only verbosely and set an exit status. rc_exit