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

30 lines
678 B

#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
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
}