X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Finit;h=3f1b26ae4d997df0c83c5db19771895519166e38;hb=f6f72be923b3a355cbd0e9749fa38d6736b37171;hp=62f701f155b577e924345148dc4608720f8148a5;hpb=9881eb03821c641460350eee4ed7aa0350e5c6ca;p=amavisd-cn.git diff --git a/debian/init b/debian/init index 62f701f..3f1b26a 100755 --- a/debian/init +++ b/debian/init @@ -1,5 +1,21 @@ #!/bin/sh +# amavisd-cn /etc/init.d/ initscript wrapper for CARNetized amavisd-new +# +# Start and stop Amavis, ClamAV and Postfix/Sendmail + +### BEGIN INIT INFO +# Provides: amavisd-cn +# Required-Start: $local_fs $remote_fs $syslog $named $network $time +# Required-Stop: $local_fs $remote_fs $syslog $named $network +# Should-Start: +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: start and stop Amavis, ClamAV and Postfix/Sendmail +# Description: wrapper for starting/stopping MTA and related services +### END INIT INFO + set -e # options for daemons: @@ -108,18 +124,30 @@ esac mta=postfix case "$arg" in - start|stop|restart|reload|force-reload) + start|stop|restart|reload|force-reload|debug) /etc/init.d/amavis.amavisd-new "$arg" ;; istart) start clamd start amavis - /etc/init.d/$mta start + if [ -x "/etc/init.d/$mta" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d $mta start + else + /etc/init.d/$mta start + fi + fi ;; istop) - /etc/init.d/$mta stop + if [ -x "/etc/init.d/$mta" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d $mta stop + else + /etc/init.d/$mta stop + fi + fi stop amavis stop clamd ;;