aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-04-26 12:20:49 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-04-26 12:20:49 +0000
commitabb5c6ef883ea901ff44656ebee7f0ac3f144013 (patch)
tree03951355c59c95a503b0189e6baa283403d6828f
parent34d36791525deb2ee9a648c46d6c6ffa353e8882 (diff)
downloadalpine_aports-abb5c6ef883ea901ff44656ebee7f0ac3f144013.tar.bz2
alpine_aports-abb5c6ef883ea901ff44656ebee7f0ac3f144013.tar.xz
alpine_aports-abb5c6ef883ea901ff44656ebee7f0ac3f144013.zip
main/dovecot: update init.d script
copied from gentoo ref #590
-rw-r--r--main/dovecot/APKBUILD4
-rw-r--r--main/dovecot/dovecot.initd17
2 files changed, 11 insertions, 10 deletions
diff --git a/main/dovecot/APKBUILD b/main/dovecot/APKBUILD
index 4e2f9b6939..33ed4802fb 100644
--- a/main/dovecot/APKBUILD
+++ b/main/dovecot/APKBUILD
@@ -2,7 +2,7 @@
2# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 2# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
3pkgname=dovecot 3pkgname=dovecot
4pkgver=2.0.12 4pkgver=2.0.12
5pkgrel=0 5pkgrel=1
6pkgdesc="IMAP and POP3 server" 6pkgdesc="IMAP and POP3 server"
7url="http://www.dovecot.org/" 7url="http://www.dovecot.org/"
8arch="all" 8arch="all"
@@ -98,5 +98,5 @@ config() {
98 98
99md5sums="689e1a8863d4fb2fd252e1a6121dd181 dovecot-2.0.12.tar.gz 99md5sums="689e1a8863d4fb2fd252e1a6121dd181 dovecot-2.0.12.tar.gz
100aec5cc797ab2acf72ce3b6bb1030345f dovecot.logrotate 100aec5cc797ab2acf72ce3b6bb1030345f dovecot.logrotate
101c58b474dca20e6e60fa4f1f5b9c726e1 dovecot.initd 10101067b40dfd74dfb79b946af1e680745 dovecot.initd
10295cf57ecc835882228bbbb019ce3abf8 dovecot-sample-config.post-install" 10295cf57ecc835882228bbbb019ce3abf8 dovecot-sample-config.post-install"
diff --git a/main/dovecot/dovecot.initd b/main/dovecot/dovecot.initd
index 7ce07f61cb..8e2075d5a6 100644
--- a/main/dovecot/dovecot.initd
+++ b/main/dovecot/dovecot.initd
@@ -1,12 +1,13 @@
1#!/sbin/runscript 1#!/sbin/runscript
2# Copyright 1999-2008 Gentoo Foundation 2# Copyright 1999-2008 Gentoo Foundation
3# Distributed under the terms of the GNU General Public License, v2 or later 3# Distributed under the terms of the GNU General Public License, v2 or later
4# $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 $ 4# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/files/dovecot.init-r2,v 1.3 2010/05/19 13:26:56 patrick Exp $
5 5
6opts="reload" 6opts="${opts} reload"
7 7
8depend() { 8depend() {
9 need localmount net 9 need localmount net
10 before postfix
10 after bootmisc firewall ldap mysql ntp-client ntpd postgresql \ 11 after bootmisc firewall ldap mysql ntp-client ntpd postgresql \
11 saslauthd slapd 12 saslauthd slapd
12 use logger 13 use logger
@@ -23,14 +24,14 @@ checkconfig() {
23 eerror "You will need an ${DOVECOT_CONF} first" 24 eerror "You will need an ${DOVECOT_CONF} first"
24 return 1 25 return 1
25 fi 26 fi
26 DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | sed -ne '/^base_dir/{s#^base_dir:[[:space:]]*\(.*[^/]\)/\?$#\1#;p}') 27 if [ -x /usr/sbin/dovecot ]; then
28 DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | grep '^base_dir = ' | sed 's/^base_dir = //')
29 else
30 eerror "dovecot not executable"
31 return 1
32 fi
27 DOVECOT_BASEDIR=${DOVECOT_BASEDIR:-/var/run/dovecot} 33 DOVECOT_BASEDIR=${DOVECOT_BASEDIR:-/var/run/dovecot}
28 DOVECOT_PIDFILE=${DOVECOT_BASEDIR}/master.pid 34 DOVECOT_PIDFILE=${DOVECOT_BASEDIR}/master.pid
29 if [ ! -d "${DOVECOT_BASEDIR}" ]; then
30 ebegin "Creating missing base_dir ${DOVECOT_BASEDIR}"
31 install -d -o root -g root -m 0755 "${DOVECOT_BASEDIR}"
32 eend $?
33 fi
34} 35}
35 36
36start() { 37start() {