From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A3AD2139694 for ; Sat, 11 Mar 2017 07:58:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ED3B6E0C26; Sat, 11 Mar 2017 07:58:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C6240E0C26 for ; Sat, 11 Mar 2017 07:58:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 79F5833BF43 for ; Sat, 11 Mar 2017 07:58:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E8F4D6441 for ; Sat, 11 Mar 2017 07:58:46 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1489219115.12942acaa4b53ec62de0112ecda4fb24e7386312.grobian@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/exim/, mail-mta/exim/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: mail-mta/exim/exim-4.89.ebuild mail-mta/exim/files/exim.rc10 X-VCS-Directories: mail-mta/exim/ mail-mta/exim/files/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 12942acaa4b53ec62de0112ecda4fb24e7386312 X-VCS-Branch: master Date: Sat, 11 Mar 2017 07:58:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 119e289a-6a71-4614-9fae-b2781a008064 X-Archives-Hash: cf1dbd8f9fbe28a0780556296b59865d commit: 12942acaa4b53ec62de0112ecda4fb24e7386312 Author: Fabian Groffen gentoo org> AuthorDate: Sat Mar 11 07:58:35 2017 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Mar 11 07:58:35 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12942aca mail-mta/exim: remove bashisms from init-script, bug #612262 Package-Manager: Portage-2.3.3, Repoman-2.3.1 mail-mta/exim/exim-4.89.ebuild | 2 +- mail-mta/exim/files/exim.rc10 | 47 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) 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 $? +}