diff options
author | Marc Schiffbauer <mschiff@gentoo.org> | 2018-04-03 16:31:15 +0200 |
---|---|---|
committer | Marc Schiffbauer <mschiff@gentoo.org> | 2018-04-03 16:31:36 +0200 |
commit | 098b15f499ccd6a622802005c8d37a7a600f2f23 (patch) | |
tree | a7e957ec9fd4aadf4bff389e79d38025f178eea7 /mail-filter/amavisd-milter/files | |
parent | games-strategy/freeciv: Removed old. (diff) | |
download | gentoo-098b15f499ccd6a622802005c8d37a7a600f2f23.tar.gz gentoo-098b15f499ccd6a622802005c8d37a7a600f2f23.tar.bz2 gentoo-098b15f499ccd6a622802005c8d37a7a600f2f23.zip |
mail-filter/amavisd-milter: fix amavisd dep in init script
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'mail-filter/amavisd-milter/files')
-rw-r--r-- | mail-filter/amavisd-milter/files/amavisd-milter.initd-r1 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mail-filter/amavisd-milter/files/amavisd-milter.initd-r1 b/mail-filter/amavisd-milter/files/amavisd-milter.initd-r1 new file mode 100644 index 000000000000..61ae169e9bb4 --- /dev/null +++ b/mail-filter/amavisd-milter/files/amavisd-milter.initd-r1 @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +NAME="amavisd-milter" +DAEMON="/usr/sbin/${NAME}" + +depend() { + use logger dns amavisd 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 +} |