From abb5c6ef883ea901ff44656ebee7f0ac3f144013 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 26 Apr 2011 12:20:49 +0000 Subject: main/dovecot: update init.d script copied from gentoo ref #590 --- main/dovecot/APKBUILD | 4 ++-- main/dovecot/dovecot.initd | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'main/dovecot') diff --git a/main/dovecot/APKBUILD b/main/dovecot/APKBUILD index 4e2f9b693..33ed4802f 100644 --- a/main/dovecot/APKBUILD +++ b/main/dovecot/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa pkgname=dovecot pkgver=2.0.12 -pkgrel=0 +pkgrel=1 pkgdesc="IMAP and POP3 server" url="http://www.dovecot.org/" arch="all" @@ -98,5 +98,5 @@ config() { md5sums="689e1a8863d4fb2fd252e1a6121dd181 dovecot-2.0.12.tar.gz aec5cc797ab2acf72ce3b6bb1030345f dovecot.logrotate -c58b474dca20e6e60fa4f1f5b9c726e1 dovecot.initd +01067b40dfd74dfb79b946af1e680745 dovecot.initd 95cf57ecc835882228bbbb019ce3abf8 dovecot-sample-config.post-install" diff --git a/main/dovecot/dovecot.initd b/main/dovecot/dovecot.initd index 7ce07f61c..8e2075d5a 100644 --- a/main/dovecot/dovecot.initd +++ b/main/dovecot/dovecot.initd @@ -1,12 +1,13 @@ #!/sbin/runscript # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-mail/dovecot/files/dovecot.init-r2,v 1.1 2008/11/03 17:22:59 wschlich Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/files/dovecot.init-r2,v 1.3 2010/05/19 13:26:56 patrick Exp $ -opts="reload" +opts="${opts} reload" depend() { need localmount net + before postfix after bootmisc firewall ldap mysql ntp-client ntpd postgresql \ saslauthd slapd use logger @@ -23,14 +24,14 @@ checkconfig() { eerror "You will need an ${DOVECOT_CONF} first" return 1 fi - DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | sed -ne '/^base_dir/{s#^base_dir:[[:space:]]*\(.*[^/]\)/\?$#\1#;p}') + if [ -x /usr/sbin/dovecot ]; then + DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | grep '^base_dir = ' | sed 's/^base_dir = //') + else + eerror "dovecot not executable" + return 1 + fi DOVECOT_BASEDIR=${DOVECOT_BASEDIR:-/var/run/dovecot} DOVECOT_PIDFILE=${DOVECOT_BASEDIR}/master.pid - if [ ! -d "${DOVECOT_BASEDIR}" ]; then - ebegin "Creating missing base_dir ${DOVECOT_BASEDIR}" - install -d -o root -g root -m 0755 "${DOVECOT_BASEDIR}" - eend $? - fi } start() { -- cgit v1.2.3