You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/mail-filter/amavisd-milter/files/amavisd-milter.initd

31 lines
803 B

#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-milter/files/amavisd-milter.initd,v 1.2 2012/07/24 17:38:03 eras Exp $
NAME="amavisd-milter"
DAEMON="/usr/sbin/${NAME}"
depend() {
use logger dns amavis sendmail
}
start() {
ebegin "Starting ${NAME}"
start-stop-daemon --start --quiet --exec "${DAEMON}" -p "${PIDFILE}" --user amavis -- ${DOPTIONS}
eend $? "Failed to start ${NAME}"
}
stop() {
ebegin "Stopping ${NAME}"
start-stop-daemon --stop --name "${NAME}"
eend $? "Failed to stop ${NAME}"
}
restart() {
svc_stop
# needed to avoid potential mi_stop errors
sleep 4
svc_start
}