summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanno Böck <hanno@gentoo.org>2008-11-20 13:26:32 +0000
committerHanno Böck <hanno@gentoo.org>2008-11-20 13:26:32 +0000
commit1a1f037ae6ed22ae8a031dd0258cef3163d4a36d (patch)
tree84c670b3a6230eca288ac07ef007465438b46c3b /mail-mta/courier
parentia64/sparc/x86 stable wrt #246826 (diff)
downloadgentoo-2-1a1f037ae6ed22ae8a031dd0258cef3163d4a36d.tar.gz
gentoo-2-1a1f037ae6ed22ae8a031dd0258cef3163d4a36d.tar.bz2
gentoo-2-1a1f037ae6ed22ae8a031dd0258cef3163d4a36d.zip
courier: fix location of webmaild executable in initscript
(Portage version: 2.2_rc14/cvs/Linux 2.6.28-rc5 x86_64)
Diffstat (limited to 'mail-mta/courier')
-rw-r--r--mail-mta/courier/ChangeLog6
-rw-r--r--mail-mta/courier/courier-0.60.0.ebuild9
-rw-r--r--mail-mta/courier/files/courier-init-r2181
3 files changed, 189 insertions, 7 deletions
diff --git a/mail-mta/courier/ChangeLog b/mail-mta/courier/ChangeLog
index f82126a08423..7f1b30d7bd34 100644
--- a/mail-mta/courier/ChangeLog
+++ b/mail-mta/courier/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for mail-mta/courier
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/ChangeLog,v 1.113 2008/08/23 01:50:34 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/ChangeLog,v 1.114 2008/11/20 13:26:32 hanno Exp $
+
+ 20 Nov 2008; Hanno Boeck <hanno@gentoo.org> +files/courier-init-r2,
+ courier-0.60.0.ebuild:
+ Fix location of webmaild in init script, thanks to Mike Bryce in #225093.
23 Aug 2008; Doug Goldstein <cardoe@gentoo.org> metadata.xml:
add GLEP 56 USE flag desc from use.local.desc
diff --git a/mail-mta/courier/courier-0.60.0.ebuild b/mail-mta/courier/courier-0.60.0.ebuild
index d30739454229..d301cb4b5dd8 100644
--- a/mail-mta/courier/courier-0.60.0.ebuild
+++ b/mail-mta/courier/courier-0.60.0.ebuild
@@ -1,11 +1,8 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/courier-0.60.0.ebuild,v 1.1 2008/07/21 00:39:43 hanno Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/courier-0.60.0.ebuild,v 1.2 2008/11/20 13:26:32 hanno Exp $
-WANT_AUTOCONF="latest"
-WANT_AUTOMAKE="latest"
-
-inherit eutils flag-o-matic autotools
+inherit eutils flag-o-matic
DESCRIPTION="An MTA designed specifically for maildirs"
[ -z "${PV/?.??/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
@@ -142,7 +139,7 @@ src_install() {
keepdir "$dir2keep" || die "failed running keepdir: $dir2keep"
done
- newinitd "${FILESDIR}/courier-init-r1" "courier"
+ newinitd "${FILESDIR}/courier-init-r2" "courier"
use fam || sed -i -e's|^.*use famd$||g' "${D}/etc/init.d/courier"
cd "${D}/etc/courier"
diff --git a/mail-mta/courier/files/courier-init-r2 b/mail-mta/courier/files/courier-init-r2
new file mode 100644
index 000000000000..e19add295133
--- /dev/null
+++ b/mail-mta/courier/files/courier-init-r2
@@ -0,0 +1,181 @@
+#!/sbin/runscript
+# Portions Copyright 2003 Gentoo Linux
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/courier/files/courier-init-r2,v 1.1 2008/11/20 13:26:32 hanno Exp $
+#
+# script originally from Courier distfile original name = courier.sysvinit
+# adapted for Gentoo by Brian Jackson
+#
+# TODO
+# should we update all the .dat/.pem files when the source/config files are
+# newer than the .dat/.pem files?
+
+prefix="/usr"
+exec_prefix="/usr/bin"
+sysconfdir="/etc/courier"
+sbindir="/usr/sbin"
+libexecdir="/usr/lib/courier"
+datadir="/usr/share/courier"
+
+depend() {
+ need net
+ [ -d /etc/courier/authlib ] && need courier-authlib
+ grep -q "^IMAPDSTART=.*[Yy].*" /etc/courier/imapd && use famd
+ grep -q "^IMAPDSSLSTART=.*[Yy].*" /etc/courier/imapd-ssl && use famd
+}
+
+checkconfig() {
+
+ [ -f ${sysconfdir}/pop3d-ssl ] && . ${sysconfdir}/pop3d-ssl
+
+ # If we do not have a certificate, make one up.
+ [ ! -f "${datadir}/pop3d.pem" ] && \
+ ebegin " generating-POP3-SSL-certificate..." && "${sbindir}/mkpop3dcert"
+
+ [ -f ${sysconfdir}/imapd-ssl ] && . ${sysconfdir}/imapd-ssl
+
+ # If we do not have a certificate, make one up.
+ [ ! -f ${datadir}/imapd.pem ] && \
+ ebegin " generating-IMAP-SSL-certificate..." && "${sbindir}/mkimapdcert"
+
+ [ -f ${sysconfdir}/esmtpd-ssl ] && . ${sysconfdir}/esmtpd-ssl
+
+ # If we do not have a certificate, make one up.
+ [ ! -f ${datadir}/esmtpd.pem ] && \
+ ebegin " generating-ESMTP-SSL-certificate..." && "${sbindir}/mkesmtpdcert"
+
+ # First time after install create aliases.dat and smtpaccess.dat
+
+ [ -f ${sysconfdir}/aliases.dat ] || ${sbindir}/makealiases
+
+ [ -f ${sysconfdir}/${ACCESSFILE}.dat ] || ${sbindir}/makesmtpaccess
+
+ [ -f ${sysconfdir}/${ACCESSFILE}.dat ] || ${sbindir}/makesmtpaccess-msa
+}
+
+start() {
+ # Start daemons.
+ ebegin "Starting Courier mail server:"
+
+ checkconfig || return 1
+
+ ebegin " Starting courierfilterd"
+ ${sbindir}/courierfilter start
+
+ [ ! -d /etc/courier/authlib ] && [ -x ${libexecdir}/authlib/authdaemond ] && \
+ ${libexecdir}/authlib/authdaemond start && ebegin " Starting authdaemond"
+
+ [ -x ${sbindir}/webmaild ] && \
+ ${sbindir}/webmaild start && ebegin " Starting webmaild"
+
+ [ -x ${sbindir}/courierldapaliasd ] && \
+ ${sbindir}/courierldapaliasd start && ebegin " Starting courierldapaliasd"
+
+ ebegin " Starting courierd"
+ ${sbindir}/courier start
+
+ # start esmtpd if so written
+ [ -f ${sysconfdir}/esmtpd ] && source ${sysconfdir}/esmtpd
+ case x$ESMTPDSTART in
+ x[yY]*)
+ ebegin " Starting esmtpd"
+ ${sbindir}/esmtpd start
+ ;;
+ esac
+
+ # start esmtpd-msa if so written
+ [ -f ${sysconfdir}/esmtpd-msa ] && source ${sysconfdir}/esmtpd-msa
+ case x$ESMTPDSTART in
+ x[yY]*)
+ ebegin " Starting esmtpd-msa"
+ ${sbindir}/esmtpd-msa start
+ ;;
+ esac
+
+ # start esmtpd-ssl if so written
+ [ -f ${sysconfdir}/esmtpd-ssl ] && source ${sysconfdir}/esmtpd-ssl
+ case x$ESMTPDSSLSTART in
+ x[yY]*)
+ ebegin " Starting esmtpd-ssl"
+ ${sbindir}/esmtpd-ssl start
+ ;;
+ esac
+
+ # start pop3d if so written
+ [ -f ${sysconfdir}/pop3d ] && source ${sysconfdir}/pop3d
+ case x$POP3DSTART in
+ x[yY]*)
+ ebegin " courier-pop3d"
+ ${sbindir}/courier-pop3d start
+ ;;
+ esac
+
+ # start pop3d-ssl if so written
+ [ -f ${sysconfdir}/pop3d-ssl ] && source ${sysconfdir}/pop3d-ssl
+ case x$POP3DSSLSTART in
+ x[yY]*)
+ ebegin " courier-pop3d-ssl"
+ ${sbindir}/courier-pop3d-ssl start
+ ;;
+ esac
+
+ [ -f ${sysconfdir}/imapd ] && source ${sysconfdir}/imapd
+ case x$IMAPDSTART in
+ x[yY]*)
+ ebegin " courier-imapd"
+ ${sbindir}/courier-imapd start
+ ;;
+ esac
+
+ [ -f ${sysconfdir}/imapd-ssl ] && source ${sysconfdir}/imapd-ssl
+ case x$IMAPDSSLSTART in
+ x[yY]*)
+ ebegin " courier-imapd-ssl"
+ ${sbindir}/courier-imapd-ssl start
+ ;;
+ esac
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Courier mail server:"
+
+ ebegin " Stopping courier-esmtpd"
+ ${sbindir}/esmtpd stop
+
+ ebegin " Stopping courier-esmtpd-msa"
+ ${sbindir}/esmtpd-msa stop
+
+ ebegin " Stopping courier-esmtpd-ssl"
+ ${sbindir}/esmtpd-ssl stop
+
+ [ -x ${sbindir}/courier-pop3d ] && \
+ ebegin " Stopping courier-pop3d" && ${sbindir}/courier-pop3d stop
+
+ [ -x ${sbindir}/courier-pop3d-ssl ] && \
+ ebegin " Stopping courier-pop3d-ssl" && ${sbindir}/courier-pop3d-ssl stop
+
+ [ -x ${sbindir}/courier-imapd ] && \
+ ebegin " Stopping courier-imapd" && ${sbindir}/courier-imapd stop
+
+
+ [ -x ${sbindir}/courier-imapd-ssl ] && \
+ ebegin " Stopping courier-imapd-ssl" && ${sbindir}/courier-imapd-ssl stop
+
+ ebegin " Stopping courierd"
+ ${sbindir}/courier stop
+
+ [ -x ${sbindir}/courierldapaliasd ] && \
+ ( ${sbindir}/courierldapaliasd stop ; ebegin " Stopping courierldapaliasd" )
+
+ [ -x ${sbindir}/webmaild ] && \
+ ( ${sbindir}/webmaild stop ; ebegin " Stopping webmaild" )
+
+ [ ! -d /etc/courier/authlib ] && [ -x ${libexecdir}/authlib/authdaemond ] && \
+ ( ${libexecdir}/authlib/authdaemond stop ; ebegin " Stopping authdaemond" )
+
+ ${sbindir}/courierfilter stop
+ ebegin " Stopping courierfilterd"
+
+ eend $?
+}