summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2017-03-11 08:58:35 +0100
committerFabian Groffen <grobian@gentoo.org>2017-03-11 08:58:35 +0100
commit12942acaa4b53ec62de0112ecda4fb24e7386312 (patch)
tree4715e304a046b222dc9ea43908548c9338e98417 /mail-mta/exim
parentdev-ruby/hiera: add 3.3.1 (diff)
downloadgentoo-12942acaa4b53ec62de0112ecda4fb24e7386312.tar.gz
gentoo-12942acaa4b53ec62de0112ecda4fb24e7386312.tar.bz2
gentoo-12942acaa4b53ec62de0112ecda4fb24e7386312.zip
mail-mta/exim: remove bashisms from init-script, bug #612262
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'mail-mta/exim')
-rw-r--r--mail-mta/exim/exim-4.89.ebuild2
-rw-r--r--mail-mta/exim/files/exim.rc1047
2 files changed, 48 insertions, 1 deletions
diff --git a/mail-mta/exim/exim-4.89.ebuild b/mail-mta/exim/exim-4.89.ebuild
index 5a527a41b49..562c9d8ef25 100644
--- a/mail-mta/exim/exim-4.89.ebuild
+++ b/mail-mta/exim/exim-4.89.ebuild
@@ -490,7 +490,7 @@ src_install () {
insinto /etc/logrotate.d
newins "${FILESDIR}/exim.logrotate" exim
- newinitd "${FILESDIR}"/exim.rc9 exim
+ newinitd "${FILESDIR}"/exim.rc10 exim
newconfd "${FILESDIR}"/exim.confd exim
systemd_dounit "${FILESDIR}"/{exim.service,exim.socket,exim-submission.socket}
diff --git a/mail-mta/exim/files/exim.rc10 b/mail-mta/exim/files/exim.rc10
new file mode 100644
index 00000000000..c44dba16ce2
--- /dev/null
+++ b/mail-mta/exim/files/exim.rc10
@@ -0,0 +1,47 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+depend() {
+ need logger
+ use antivirus net
+ provide mta
+}
+
+tidy_dbs() {
+ local spooldir=$(/usr/sbin/exim -C /etc/exim/${SVCNAME}.conf -bP -n spool_directory)
+ local db
+ local ret=0
+ ebegin "Tidying hints databases in ${spooldir}/db"
+ for db in "${spooldir}"/db/* ; do
+ case "${db}" in
+ *".lockfile"|*"*") continue ;;
+ esac
+ /usr/sbin/exim_tidydb ${TIDY_OPTS} "${spooldir}" ${db##*/} > /dev/null
+ : $((ret += $?))
+ done
+ eend ${ret}
+}
+
+start() {
+ # if you use multiple instances, make sure you set spool_directory
+ # in the configfile
+ tidy_dbs
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/exim --pidfile /run/${SVCNAME}.pid -- -C /etc/exim/${SVCNAME}.conf ${EXIM_OPTS:--bd -q15m}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile /run/${SVCNAME}.pid --name exim
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile /run/${SVCNAME}.pid --name exim
+ eend $?
+}