[csw-devel] SF.net SVN: gar:[7355] csw/mgar/pkg/dovecot/trunk
skayser at users.sourceforge.net
skayser at users.sourceforge.net
Thu Nov 19 10:37:43 CET 2009
Revision: 7355
http://gar.svn.sourceforge.net/gar/?rev=7355&view=rev
Author: skayser
Date: 2009-11-19 09:37:43 +0000 (Thu, 19 Nov 2009)
Log Message:
-----------
dovecot: working copy towards 1.1.20
Modified Paths:
--------------
csw/mgar/pkg/dovecot/trunk/Makefile
csw/mgar/pkg/dovecot/trunk/checksums
Added Paths:
-----------
csw/mgar/pkg/dovecot/trunk/files/README.CSW
csw/mgar/pkg/dovecot/trunk/files/changelog.CSW
csw/mgar/pkg/dovecot/trunk/files/cswdovecot
Removed Paths:
-------------
csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.README.CSW
csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.changelog.CSW
csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.cswdovecot
csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.cswusergroup
Modified: csw/mgar/pkg/dovecot/trunk/Makefile
===================================================================
--- csw/mgar/pkg/dovecot/trunk/Makefile 2009-11-19 09:29:42 UTC (rev 7354)
+++ csw/mgar/pkg/dovecot/trunk/Makefile 2009-11-19 09:37:43 UTC (rev 7355)
@@ -1,8 +1,11 @@
-# TODO:
-# * Bump to 1.1.13, http://hg.dovecot.org/dovecot-1.1/rev/a2013dedbad0
-
+# TODO
+# - Migrate config from /opt/csw/etc/dovecot to /etc
+# - example.conf patch needs tweaking (rejected)
+# - SSL certs to /etc/opt/csw/ssl?
+# - USERGROUP doesn't work yet, wrong usage?
+# - /var/run/dovecot instead of /var/opt/csw/run?
GARNAME = dovecot
-GARVERSION = 1.1.11
+GARVERSION = 1.1.20
CATEGORIES = server
DESCRIPTION = Secure IMAP server
@@ -13,32 +16,28 @@
special administration and it uses very little memory.
endef
-MASTER_SITES = http://dovecot.org/releases/1.1/
-DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz
+SPKG_SOURCEURL = http://dovecot.org/
+MASTER_SITES = http://dovecot.org/releases/1.1/
+DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz
+UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
-PACKAGES = CSWdovecot CSWdovecot-devel CSWdovecot-sieve
+# Sieve plugin is packaged via a post-package hook (see package-sieveplugin:)
+PACKAGES = CSWdovecot CSWdovecot-devel CSWdovecot-sieve
+NOPACKAGE = CSWdovecot-sieve
+
CATALOGNAME_CSWdovecot = dovecot
CATALOGNAME_CSWdovecot-devel = dovecot_devel
CATALOGNAME_CSWdovecot-sieve = dovecot_sieve
-# Sieve plugin is packaged individually (see package-sieveplugin:)
-NOPACKAGE = CSWdovecot-sieve
-
-# CSWdovecot is not installed on the build farm and as such its dependent
-# packages throw errors when fed to checkpkg
-ENABLE_CHECK=0
-
-SPKG_SOURCEURL = http://dovecot.org/
SPKG_DESC_CSWdovecot = Secure IMAP server
SPKG_DESC_CSWdovecot-devel = Dovecot secure IMAP server header files
SPKG_DESC_CSWdovecot-sieve = Dovecot secure IMAP server sieve plugin
-SPKG_CLASSES_CSWdovecot = none cswusergroup cswcpsampleconf cswinitsmf
REQUIRED_PKGS_CSWdovecot = CSWosslrt CSWmysql5rt CSWoldaprt CSWlibpq
REQUIRED_PKGS_CSWdovecot += CSWsasl CSWsqlite3 CSWzlib CSWlibnet
REQUIRED_PKGS_CSWdovecot += CSWbzip2 CSWiconv CSWcswclassutils
REQUIRED_PKGS_CSWdovecot += CSWkrb5lib
-REQUIRED_PKGS_CSWdovecot-devel = CSWdovecot
+REQUIRED_PKGS_CSWdovecot-devel = CSWdovecot
REQUIRED_PKGS_CSWdovecot-sieve = CSWdovecot
PREREQUISITE_PKGS = CSWossldevel CSWosslrt
@@ -52,20 +51,20 @@
PKGFILES_CSWdovecot-devel = $(PKGFILES_DEVEL)
PKGFILES_CSWdovecot-sieve = .*sieve.*
-# We define upstream file regex so we can be notifed of new upstream software release
-UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
+# These directories belong to CSWosslrt
+PROTOTYPE_FILTER = awk '\
+ $$$$3 == "/opt/csw/ssl/certs" { next } \
+ $$$$3 == "/opt/csw/ssl/private" { next } \
+ { print }'
# No test suite for Dovecot available
TEST_SCRIPTS =
-# See http://dovecot.org/list/dovecot/2009-February/037273.html
-PATCHFILES = patch-authcrash.diff
-# See http://dovecot.org/list/dovecot/2009-March/038201.html
-PATCHFILES += patch-enosys.diff
# Adjust the comment about file paths in the example conf header
PATCHFILES += patch-exampleconf.diff
# Override some paths for configure
+sysconfdir=/etc/opt/csw
localstatedir=/var/opt/csw
CONFIGURE_ARGS = $(DIRPATHS)
@@ -87,14 +86,10 @@
STRIP_DIRS = $(DESTDIR)$(libexecdir)/dovecot
-PROTOTYPE_FILTER = awk '\
- $$$$3 ~ /\/init.d\/cswdovecot$$$$/ { $$$$2 = "cswinitsmf" } \
- $$$$3 ~ /cswusergroup$$$$/ { $$$$2 = "cswusergroup" } \
- $$$$3 ~ /dovecot.pem.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } \
- $$$$3 ~ /dovecot.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } \
- $$$$3 == "/opt/csw/ssl/certs" { next } \
- $$$$3 == "/opt/csw/ssl/private" { next } \
- { print }'
+# cswclassutils integration
+INITSMF = $(sysconfdir)/init.d/cswdovecot
+USERGROUP = dovecot:dovecot:Dovecot IMAP Server:/var/opt/csw/run/dovecot/login:/bin/false
+SAMPLECONF = .*/dovecot.pem $(sysconfdir)/dovecot.conf
include gar/category.mk
@@ -102,8 +97,8 @@
# build process, but i found it easiest to put it here and not clutter
# post-install even more
pre-install-modulated:
- @perl -pi -e 's|/etc/ssl|/opt/csw/ssl|' $(WORKSRC)/doc/mkcert.sh
- @perl -pi -e '\
+ perl -pi -e 's|/etc/ssl|/opt/csw/ssl|' $(WORKSRC)/doc/mkcert.sh
+ perl -pi -e '\
s| /var/run| /var/opt/csw/run|; \
s| /etc/ssl| /opt/csw/ssl|; \
s| /usr/libexec| /opt/csw/libexec|; \
@@ -111,65 +106,65 @@
$(WORKSRC)/dovecot-example.conf
@$(MAKECOOKIE)
-# Maybe there is a nicer way to build this via modulations ...
-build-and-install-sieveplugin: CONFIGURE_ARGS = $(DIRPATHS)
-build-and-install-sieveplugin: CONFIGURE_ARGS += --with-dovecot=../$(WORKSRC)
-build-and-install-sieveplugin:
- @echo
- @echo [===== NOW BUILDING extra cmusieve plugin =====]
- @echo
- @wget -nc http://www.dovecot.org/releases/sieve/dovecot-sieve-1.1.6.tar.gz
- @gtar xzf dovecot-sieve-1.1.6.tar.gz
- @(cd dovecot-sieve-1.1.6; \
- $(CONFIGURE_ENV) ./configure $(CONFIGURE_ARGS); \
- $(BUILD_ENV) gmake $(BUILD_ARGS); \
- $(INSTALL_ENV) gmake DESTDIR=$(DESTDIR) $(INSTALL_ARGS) install; )
- @rm -rf dovecot-sieve-1.1.6*
- @$(MAKECOOKIE)
-
-# Sieve plugin needs to be packaged with version != $(GARVERSION)
-package-sieveplugin:
- @gmake -o post-package \
- NOPACKAGE="CSWdovecot CSWdovecot-devel" SPKG_VERSION=1.1.6 \
- repackage
-
-
-post-install-modulated: DOCS = NEWS AUTHORS COPYING.LGPL COPYING.MIT
post-install-modulated: DOCDEST = $(DESTDIR)$(docdir)/$(GARNAME)
+post-install-modulated: DOCS = NEWS AUTHORS COPYING.LGPL COPYING.MIT
+post-install-modulated: CSWDOCS=README.CSW changelog.CSW
post-install-modulated: SSLDIR = $(DESTDIR)/opt/csw/ssl
post-install-modulated: build-and-install-sieveplugin
- @ginstall -d $(DOCDEST)
- @ginstall -d $(DESTDIR)/etc/opt/csw/init.d
- @ginstall -d $(DESTDIR)$(sysconfdir)/pkg/CSWdovecot
- @ginstall -d $(SSLDIR)/certs
- @ginstall -d $(SSLDIR)/private
# Include these in the pkg. dovecot will create them otherwise
# with root:root ownership, which conflicts with other pkg's
- @ginstall -d $(localstatedir)/run $(localstatedir)/lib
+ ginstall -d $(DESTDIR)$(localstatedir)/run
+ ginstall -d $(DESTDIR)$(localstatedir)/lib
- @cp $(DESTDIR)$(sysconfdir)/dovecot-example.conf \
- $(DESTDIR)$(sysconfdir)/dovecot.conf.CSW
+ cp $(DESTDIR)$(sysconfdir)/dovecot-example.conf \
+ $(DESTDIR)$(sysconfdir)/dovecot.conf
# Create self-signed sample cert
- @( cd $(WORKSRC)/doc; SSLDIR=$(SSLDIR) /bin/sh ./mkcert.sh )
- @mv $(SSLDIR)/certs/dovecot.pem $(SSLDIR)/certs/dovecot.pem.CSW
- @mv $(SSLDIR)/private/dovecot.pem $(SSLDIR)/private/dovecot.pem.CSW
- @chmod 400 $(SSLDIR)/private/dovecot.pem.CSW
+ ginstall -d $(SSLDIR)/certs
+ ginstall -d $(SSLDIR)/private
+ ( cd $(WORKSRC)/doc; SSLDIR=$(SSLDIR) /bin/sh ./mkcert.sh )
+ chmod 400 $(SSLDIR)/private/dovecot.pem
# Copy documentation (upstream + CSW) and mkcert.sh
- @$(foreach DOC,$(DOCS),ginstall -m 644 $(WORKSRC)/$(DOC) $(DOCDEST);)
- @cp $(FILEDIR)/CSWdovecot.changelog.CSW $(DOCDEST)/changelog.CSW
- @cp $(FILEDIR)/CSWdovecot.README.CSW $(DOCDEST)/README.CSW
- @ginstall -m 755 $(WORKSRC)/doc/mkcert.sh $(DOCDEST)
- @cp $(WORKSRC)/doc/dovecot-openssl.cnf $(DOCDEST)
+ ginstall -d $(DOCDEST)
+ cp $(addprefix $(FILEDIR)/,$(CSWDOCS)) $(DOCDEST)
+ cp $(addprefix $(WORKSRC)/,$(DOCS)) $(DOCDEST)
+ ginstall -m 755 $(WORKSRC)/doc/mkcert.sh $(DOCDEST)
+ cp $(WORKSRC)/doc/dovecot-openssl.cnf $(DOCDEST)
- # Files for cswinitsmf and cswusergroup
- @ginstall -m 755 $(FILEDIR)/CSWdovecot.cswdovecot \
+ # Copy init script
+ ginstall -Dm 755 $(FILEDIR)/cswdovecot \
$(DESTDIR)/etc/opt/csw/init.d/cswdovecot
- @ginstall -m 644 $(FILEDIR)/CSWdovecot.cswusergroup \
- $(DESTDIR)$(sysconfdir)/pkg/CSWdovecot/cswusergroup
@$(MAKECOOKIE)
post-package: package-sieveplugin
@$(MAKECOOKIE)
+
+# Extra targets for the Sieve plugin build and packaging process, invoked
+# via post-install-modulated and post-package.
+
+SIEVEVERSION = 1.1.8
+SIEVEDIST = dovecot-sieve-$(SIEVEVERSION)
+SIEVEURL = http://www.dovecot.org/releases/sieve/$(SIEVEDIST).tar.gz
+
+build-and-install-sieveplugin: CONFIGURE_ARGS = $(DIRPATHS)
+build-and-install-sieveplugin: CONFIGURE_ARGS += --with-dovecot=../$(WORKSRC)
+build-and-install-sieveplugin:
+ @echo
+ @echo [===== NOW BUILDING extra cmusieve plugin =====]
+ @echo
+ wget -nc $(SIEVEURL)
+ gtar xzf $(SIEVEDIST).tar.gz
+ (cd $(SIEVEDIST); \
+ $(CONFIGURE_ENV) ./configure $(CONFIGURE_ARGS); \
+ $(BUILD_ENV) gmake $(BUILD_ARGS); \
+ $(INSTALL_ENV) gmake DESTDIR=$(DESTDIR) $(INSTALL_ARGS) install; )
+ rm -rf $(SIEVEDIST)*
+ @$(MAKECOOKIE)
+
+# Sieve plugin needs to be packaged with version != $(GARVERSION)
+package-sieveplugin:
+ gmake -o post-package \
+ NOPACKAGE="CSWdovecot CSWdovecot-devel" SPKG_VERSION=$(SIEVEVERSION) \
+ repackage
Modified: csw/mgar/pkg/dovecot/trunk/checksums
===================================================================
--- csw/mgar/pkg/dovecot/trunk/checksums 2009-11-19 09:29:42 UTC (rev 7354)
+++ csw/mgar/pkg/dovecot/trunk/checksums 2009-11-19 09:37:43 UTC (rev 7355)
@@ -1,4 +1,2 @@
-c973eb41aca79fb16630a16f0d84f765 download/dovecot-1.1.11.tar.gz
-1f39cae3a38d10169fe31f246095b67f download/patch-authcrash.diff
-b6bdbd7b8e6f513a8f19dbc0a7507aa6 download/patch-enosys.diff
-765a31bece26ed3cebee784dc4aa8216 download/patch-exampleconf.diff
+1b0ccfac7765d25f0d106489321a0764 dovecot-1.1.20.tar.gz
+765a31bece26ed3cebee784dc4aa8216 patch-exampleconf.diff
Deleted: csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.README.CSW
===================================================================
--- csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.README.CSW 2009-11-19 09:29:42 UTC (rev 7354)
+++ csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.README.CSW 2009-11-19 09:37:43 UTC (rev 7355)
@@ -1,56 +0,0 @@
-Configuration file
-------------------
-
-The default configuration path is /opt/csw/etc/dovecot.conf. CSWdovecot
-brings with it a sample configuration (suffixed with .CSW) that will be
-installed when dovecot.conf doesn't exist yet. This sample configuration
-provides IMAP/POP3 and IMAPS/POP3S services to system users and uses a
-self-signed certificate that comes with the package.
-
-When you adjust dovecot.conf, package upgrades will preserve your
-configuration and just install the sample configuration as dovecot.conf.CSW.
-
-
-Machine-local configuration in shared /opt setups
--------------------------------------------------
-
-If you share /opt among several machines (via NFS for example) you can use
-/etc/opt/csw/dovecot.conf as machine-local configuration. The dovecot
-startup script will then use it instead of the default configuration.
-
-
-User accounts
--------------
-
-On installation CSWdovecot will create a user named dovecot in case no user
-account by this name exists. This user account is required for the Dovecot
-login service (and nothing else).
-
-If you want to use Dovecot for virtual users, you need to create another
-user account (!= dovecot). For background information, see
-
- http://wiki.dovecot.org/UserIds
-
-
-Upgrading
----------
-
-For upgrading information from other IMAP servers or previous Dovecot
-versions, see
-
- http://wiki.dovecot.org/UpgradingDovecot
-
-
-Sieve plugin
-------------
-
-Sieve support (via the cmusieve plugin) is contained in the CSWdovecot_sieve
-package. If required install this package and add
-
- mail_plugins = cmusieve
-
-to the "protocol lda" section in dovecot.conf. This requires that you use
-Dovecot's deliver as LDA of course. See the following URLs for details
-
- http://wiki.dovecot.org/LDA
- http://wiki.dovecot.org/LDA/Sieve#CMUSieve_Plugin
Deleted: csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.changelog.CSW
===================================================================
--- csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.changelog.CSW 2009-11-19 09:29:42 UTC (rev 7354)
+++ csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.changelog.CSW 2009-11-19 09:37:43 UTC (rev 7355)
@@ -1,9 +0,0 @@
-dovecot (1.1.11,REV=2009.03.28)
-
- * Package adopted and updated to 1.1.11.
- * Tested and validated LDAP interopability with PAM. (Closes: #2760)
- * Adjusted SSLDIR in mkcert.sh. (Closes: #3027)
- * Compiled with --localstatedir=/var/opt/csw. Changes base_dir from
- /opt/csw/var/run/dovecot to /var/opt/csw/run/dovecot.
-
- -- Sebastian Kayser <skayser at opencsw.org> Sat, 28 Mar 2009 18:18:35 +0100
Deleted: csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.cswdovecot
===================================================================
--- csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.cswdovecot 2009-11-19 09:29:42 UTC (rev 7354)
+++ csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.cswdovecot 2009-11-19 09:37:43 UTC (rev 7355)
@@ -1,64 +0,0 @@
-#!/bin/sh
-# License is public domain.
-#
-# Taken from http://wiki.dovecot.org/DovecotInit
-# Modified for CSW by Sebastian Kayser
-#
-#FMRI network
-
-DAEMON=/opt/csw/sbin/dovecot
-
-test -x $DAEMON || exit 1
-set -e
-
-CONF=/opt/csw/etc/dovecot.conf
-CONF_LOCAL=/etc/opt/csw/dovecot.conf
-[ -r $CONF_LOCAL ] && CONF=$CONF_LOCAL
-
-[ "`ulimit -n`" -lt 1024 ] && ulimit -n 1024
-
-base_dir=`$DAEMON -a|grep '^base_dir: '|sed 's/^base_dir: //'`
-pidfile=$base_dir/master.pid
-
-if test -f $pidfile; then
- running=yes
-else
- running=no
-fi
-
-case "$1" in
- start)
- echo "Starting Dovecot"
- $DAEMON -c $CONF
- ;;
- stop)
- if test $running = yes; then
- echo "Stopping Dovecot"
- kill `cat $pidfile`
- else
- echo "Dovecot is already stopped."
- fi
- ;;
- reload)
- if test $running = yes; then
- echo "Reloading Dovecot configuration"
- kill -HUP `cat $pidfile`
- else
- echo "Dovecot isn't running."
- fi
- ;;
- restart|force-reload)
- echo "Restarting Dovecot"
- if test $running = yes; then
- kill `cat $pidfile`
- sleep 1
- fi
- $DAEMON -c $CONF
- ;;
- *)
- echo "Usage: /etc/init.d/cswdovecot {start|stop|reload|restart|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0
Deleted: csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.cswusergroup
===================================================================
--- csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.cswusergroup 2009-11-19 09:29:42 UTC (rev 7354)
+++ csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.cswusergroup 2009-11-19 09:37:43 UTC (rev 7355)
@@ -1 +0,0 @@
-dovecot:dovecot:Dovecot IMAP Server:/var/opt/csw/run/dovecot/login:/bin/false
Copied: csw/mgar/pkg/dovecot/trunk/files/README.CSW (from rev 6137, csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.README.CSW)
===================================================================
--- csw/mgar/pkg/dovecot/trunk/files/README.CSW (rev 0)
+++ csw/mgar/pkg/dovecot/trunk/files/README.CSW 2009-11-19 09:37:43 UTC (rev 7355)
@@ -0,0 +1,56 @@
+Configuration file
+------------------
+
+The default configuration path is /opt/csw/etc/dovecot.conf. CSWdovecot
+brings with it a sample configuration (suffixed with .CSW) that will be
+installed when dovecot.conf doesn't exist yet. This sample configuration
+provides IMAP/POP3 and IMAPS/POP3S services to system users and uses a
+self-signed certificate that comes with the package.
+
+When you adjust dovecot.conf, package upgrades will preserve your
+configuration and just install the sample configuration as dovecot.conf.CSW.
+
+
+Machine-local configuration in shared /opt setups
+-------------------------------------------------
+
+If you share /opt among several machines (via NFS for example) you can use
+/etc/opt/csw/dovecot.conf as machine-local configuration. The dovecot
+startup script will then use it instead of the default configuration.
+
+
+User accounts
+-------------
+
+On installation CSWdovecot will create a user named dovecot in case no user
+account by this name exists. This user account is required for the Dovecot
+login service (and nothing else).
+
+If you want to use Dovecot for virtual users, you need to create another
+user account (!= dovecot). For background information, see
+
+ http://wiki.dovecot.org/UserIds
+
+
+Upgrading
+---------
+
+For upgrading information from other IMAP servers or previous Dovecot
+versions, see
+
+ http://wiki.dovecot.org/UpgradingDovecot
+
+
+Sieve plugin
+------------
+
+Sieve support (via the cmusieve plugin) is contained in the CSWdovecot_sieve
+package. If required install this package and add
+
+ mail_plugins = cmusieve
+
+to the "protocol lda" section in dovecot.conf. This requires that you use
+Dovecot's deliver as LDA of course. See the following URLs for details
+
+ http://wiki.dovecot.org/LDA
+ http://wiki.dovecot.org/LDA/Sieve#CMUSieve_Plugin
Copied: csw/mgar/pkg/dovecot/trunk/files/changelog.CSW (from rev 6137, csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.changelog.CSW)
===================================================================
--- csw/mgar/pkg/dovecot/trunk/files/changelog.CSW (rev 0)
+++ csw/mgar/pkg/dovecot/trunk/files/changelog.CSW 2009-11-19 09:37:43 UTC (rev 7355)
@@ -0,0 +1,9 @@
+dovecot (1.1.11,REV=2009.03.28)
+
+ * Package adopted and updated to 1.1.11.
+ * Tested and validated LDAP interopability with PAM. (Closes: #2760)
+ * Adjusted SSLDIR in mkcert.sh. (Closes: #3027)
+ * Compiled with --localstatedir=/var/opt/csw. Changes base_dir from
+ /opt/csw/var/run/dovecot to /var/opt/csw/run/dovecot.
+
+ -- Sebastian Kayser <skayser at opencsw.org> Sat, 28 Mar 2009 18:18:35 +0100
Copied: csw/mgar/pkg/dovecot/trunk/files/cswdovecot (from rev 6137, csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.cswdovecot)
===================================================================
--- csw/mgar/pkg/dovecot/trunk/files/cswdovecot (rev 0)
+++ csw/mgar/pkg/dovecot/trunk/files/cswdovecot 2009-11-19 09:37:43 UTC (rev 7355)
@@ -0,0 +1,64 @@
+#!/bin/sh
+# License is public domain.
+#
+# Taken from http://wiki.dovecot.org/DovecotInit
+# Modified for CSW by Sebastian Kayser
+#
+#FMRI network
+
+DAEMON=/opt/csw/sbin/dovecot
+
+test -x $DAEMON || exit 1
+set -e
+
+CONF=/opt/csw/etc/dovecot.conf
+CONF_LOCAL=/etc/opt/csw/dovecot.conf
+[ -r $CONF_LOCAL ] && CONF=$CONF_LOCAL
+
+[ "`ulimit -n`" -lt 1024 ] && ulimit -n 1024
+
+base_dir=`$DAEMON -a|grep '^base_dir: '|sed 's/^base_dir: //'`
+pidfile=$base_dir/master.pid
+
+if test -f $pidfile; then
+ running=yes
+else
+ running=no
+fi
+
+case "$1" in
+ start)
+ echo "Starting Dovecot"
+ $DAEMON -c $CONF
+ ;;
+ stop)
+ if test $running = yes; then
+ echo "Stopping Dovecot"
+ kill `cat $pidfile`
+ else
+ echo "Dovecot is already stopped."
+ fi
+ ;;
+ reload)
+ if test $running = yes; then
+ echo "Reloading Dovecot configuration"
+ kill -HUP `cat $pidfile`
+ else
+ echo "Dovecot isn't running."
+ fi
+ ;;
+ restart|force-reload)
+ echo "Restarting Dovecot"
+ if test $running = yes; then
+ kill `cat $pidfile`
+ sleep 1
+ fi
+ $DAEMON -c $CONF
+ ;;
+ *)
+ echo "Usage: /etc/init.d/cswdovecot {start|stop|reload|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list