commit:     098b15f499ccd6a622802005c8d37a7a600f2f23
Author:     Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  3 14:31:15 2018 +0000
Commit:     Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Tue Apr  3 14:31:36 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=098b15f4

mail-filter/amavisd-milter: fix amavisd dep in init script

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../amavisd-milter/amavisd-milter-1.6.0-r1.ebuild  |  4 +--
 .../amavisd-milter/amavisd-milter-1.6.0.ebuild     |  4 +--
 .../amavisd-milter/files/amavisd-milter.initd-r1   | 29 ++++++++++++++++++++++
 3 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/mail-filter/amavisd-milter/amavisd-milter-1.6.0-r1.ebuild 
b/mail-filter/amavisd-milter/amavisd-milter-1.6.0-r1.ebuild
index 157ccb62930..74a12efd464 100644
--- a/mail-filter/amavisd-milter/amavisd-milter-1.6.0-r1.ebuild
+++ b/mail-filter/amavisd-milter/amavisd-milter-1.6.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -28,6 +28,6 @@ src_install() {
 
        dodoc AUTHORS CHANGES INSTALL README TODO
 
-       newinitd "${FILESDIR}/amavisd-milter.initd" amavisd-milter
+       newinitd "${FILESDIR}/amavisd-milter.initd-r1" amavisd-milter
        newconfd "${FILESDIR}/amavisd-milter.confd" amavisd-milter
 }

diff --git a/mail-filter/amavisd-milter/amavisd-milter-1.6.0.ebuild 
b/mail-filter/amavisd-milter/amavisd-milter-1.6.0.ebuild
index d0ad1d5fa9f..2ea91b4704b 100644
--- a/mail-filter/amavisd-milter/amavisd-milter-1.6.0.ebuild
+++ b/mail-filter/amavisd-milter/amavisd-milter-1.6.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -27,6 +27,6 @@ src_install() {
 
        dodoc AUTHORS CHANGES INSTALL README TODO
 
-       newinitd "${FILESDIR}/amavisd-milter.initd" amavisd-milter
+       newinitd "${FILESDIR}/amavisd-milter.initd-r1" amavisd-milter
        newconfd "${FILESDIR}/amavisd-milter.confd" amavisd-milter
 }

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 00000000000..61ae169e9bb
--- /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
+}

Reply via email to