summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schiffbauer <mschiff@gentoo.org>2018-04-03 16:31:15 +0200
committerMarc Schiffbauer <mschiff@gentoo.org>2018-04-03 16:31:36 +0200
commit098b15f499ccd6a622802005c8d37a7a600f2f23 (patch)
treea7e957ec9fd4aadf4bff389e79d38025f178eea7 /mail-filter/amavisd-milter/files
parentgames-strategy/freeciv: Removed old. (diff)
downloadgentoo-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-r129
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
+}