diff options
author | jlam <jlam@pkgsrc.org> | 2006-06-17 19:26:48 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-06-17 19:26:48 +0000 |
commit | 6785de9b15d049c1839cd21eb72c98d92bb17412 (patch) | |
tree | 5b2f0e62c02ac14ea0077ba709a2d6fa88ba3fb4 /mail/sqwebmail | |
parent | fc857b0f132923aab98365277fa7ecbe961e9dae (diff) | |
download | pkgsrc-6785de9b15d049c1839cd21eb72c98d92bb17412.tar.gz |
Modify the Courier services rc.d scripts so that:
(1) they are more likely to do the right thing if the user sets
rc_fast_and_loose; and
(2) they pre-create any necessary directories prior to start the
respective services.
Also, fix the path to the courierwebadmin binary in SPECIAL_PERMS for the
courier-mta package.
Bump the PKGREVISION.
Diffstat (limited to 'mail/sqwebmail')
-rw-r--r-- | mail/sqwebmail/Makefile | 6 | ||||
-rw-r--r-- | mail/sqwebmail/files/sqwebmail.sh | 32 |
2 files changed, 33 insertions, 5 deletions
diff --git a/mail/sqwebmail/Makefile b/mail/sqwebmail/Makefile index 95c51fd94e8..00b8092213b 100644 --- a/mail/sqwebmail/Makefile +++ b/mail/sqwebmail/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.49 2006/06/09 22:12:01 jlam Exp $ +# $NetBSD: Makefile,v 1.50 2006/06/17 19:26:48 jlam Exp $ DISTNAME= sqwebmail-5.1.2 +PKGREVISION= 1 CATEGORIES= mail www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/} EXTRACT_SUFX= .tar.bz2 @@ -32,6 +33,9 @@ SQWEBMAIL_IMAGEDIR= ${PREFIX}/share/courier/sqwebmail/images SQWEBMAIL_IMAGEURL?= /sqwebmail BUILD_DEFS+= SQWEBMAIL_IMAGEURL FILES_SUBST+= SQWEBMAIL_STATEDIR=${SQWEBMAIL_STATEDIR:Q} +FILES_SUBST+= SQWEBMAIL_CACHEDIR=${SQWEBMAIL_CACHEDIR:Q} +FILES_SUBST+= SQWEBMAIL_CALENDARDIR=${SQWEBMAIL_CALENDARDIR:Q} +FILES_SUBST+= ROOT_USER=${ROOT_USER:Q} MESSAGE_SUBST+= IMAGEDIR=${SQWEBMAIL_IMAGEDIR} MESSAGE_SUBST+= IMAGEURL=${SQWEBMAIL_IMAGEURL} diff --git a/mail/sqwebmail/files/sqwebmail.sh b/mail/sqwebmail/files/sqwebmail.sh index 8ef467fb874..7a3fd04069d 100644 --- a/mail/sqwebmail/files/sqwebmail.sh +++ b/mail/sqwebmail/files/sqwebmail.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: sqwebmail.sh,v 1.4 2006/04/28 18:16:25 jlam Exp $ +# $NetBSD: sqwebmail.sh,v 1.5 2006/06/17 19:26:48 jlam Exp $ # # Courier SqWebMail services daemon # @@ -17,10 +17,34 @@ ctl_command="@PREFIX@/sbin/sqwebmaild" pidfile="@VARBASE@/run/sqwebmaild.pid" required_files="@PKG_SYSCONFDIR@/calendarmode @PKG_SYSCONFDIR@/sqwebmaild" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +start_precmd="sqwebmail_prestart" +start_cmd="sqwebmail_doit start" +stop_cmd="sqwebmail_doit stop" -courier_doit() +mkdir_perms() { + dir="$1"; owner="$2"; group="$3"; mode="$4" + @TEST@ -d $dir || @MKDIR@ $dir + @CHOWN@ $user $dir + @CHGRP@ group $dir + @CHMOD@ $mode $dir +} + +sqwebmail_prestart() +{ + # Courier webmail and calendar (pcp) directories + @MKDIR@ @SQWEBMAIL_STATEDIR@ + @MKDIR@ @SQWEBMAIL_CACHEDIR@ + mkdir_perms @SQWEBMAIL_CALENDARDIR@ \ + @ROOT_USER@ @COURIER_GROUP@ 0755 + mkdir_perms @SQWEBMAIL_CALENDARDIR@/public \ + @ROOT_USER@ @COURIER_GROUP@ 0755 + mkdir_perms @SQWEBMAIL_CALENDARDIR@/private \ + @ROOT_USER@ @COURIER_GROUP@ 0750 + mkdir_perms @SQWEBMAIL_CALENDARDIR@/localcache \ + @ROOT_USER@ @COURIER_GROUP@ 0750 +} + +sqwebmail_doit() { action=$1 case $action in |