diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-24 01:20:21 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-24 01:20:21 +0000 |
commit | 00d72f6d0b0e68bede02776bda296c5f769a08cd (patch) | |
tree | 06c5f3cb98205ef616db80657864278a561e49ef /mail | |
parent | ba8bd65c9c59eea89399f94aeeedd7e05b31cd31 (diff) | |
download | pkgsrc-00d72f6d0b0e68bede02776bda296c5f769a08cd.tar.gz |
Add a convenience control script /etc/rc.d/sqwebmail that invokes
sqwebmaild and pcpd.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/sqwebmail/Makefile | 29 | ||||
-rw-r--r-- | mail/sqwebmail/files/sqwebmail.sh | 53 |
2 files changed, 68 insertions, 14 deletions
diff --git a/mail/sqwebmail/Makefile b/mail/sqwebmail/Makefile index 81c4d27251e..e2a594fc7c6 100644 --- a/mail/sqwebmail/Makefile +++ b/mail/sqwebmail/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2004/02/24 00:22:45 jlam Exp $ +# $NetBSD: Makefile,v 1.20 2004/02/24 01:20:21 jlam Exp $ DISTNAME= sqwebmail-3.6.2 CATEGORIES= www @@ -25,23 +25,24 @@ INSTALL_TARGET= install-strip .endif INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} sysconfdir=${EGDIR} -STATEDIR= /var/sqwebmail -CACHEDIR= ${STATEDIR}/cache -CALENDARDIR= ${STATEDIR}/calendar +SQWEBMAIL_STATEDIR= /var/sqwebmail +SQWEBMAIL_CACHEDIR= ${SQWEBMAIL_STATEDIR}/cache +SQWEBMAIL_CALENDARDIR= ${SQWEBMAIL_STATEDIR}/calendar SQWEBMAIL_HTMLDIR= ${DATADIR}/sqwebmail/html SQWEBMAIL_IMAGEDIR= ${DATADIR}/sqwebmail/images SQWEBMAIL_IMAGEURL?= /sqwebmail BUILD_DEFS+= SQWEBMAIL_IMAGEURL +FILES_SUBST+= SQWEBMAIL_STATEDIR=${SQWEBMAIL_STATEDIR:Q} SENDMAIL?= /usr/sbin/sendmail # This is used by the sqwebmail configure script to set the location of # the sqwebmaild socket file, lockfile, and pidfile. # -CONFIGURE_ARGS+= --localstatedir=${STATEDIR} +CONFIGURE_ARGS+= --localstatedir=${SQWEBMAIL_STATEDIR} -CONFIGURE_ARGS+= --with-cachedir=${CACHEDIR} -CONFIGURE_ARGS+= --with-calendardir=${CALENDARDIR} +CONFIGURE_ARGS+= --with-cachedir=${SQWEBMAIL_CACHEDIR} +CONFIGURE_ARGS+= --with-calendardir=${SQWEBMAIL_CALENDARDIR} CONFIGURE_ARGS+= --with-cacheowner=${ROOT_USER} CONFIGURE_ARGS+= --with-mailer=${SENDMAIL} CONFIGURE_ARGS+= --enable-https=auto @@ -59,12 +60,12 @@ CONFIGURE_ENV+= ldapsearch="${LOCALBASE}/bin/ldapsearch" MAIL_GROUP?= mail PKG_GROUPS= ${MAIL_GROUP} -OWN_DIRS= ${STATEDIR} -OWN_DIRS_PERMS= ${CACHEDIR} ${ROOT_USER} ${ROOT_GROUP} 0755 -OWN_DIRS_PERMS+= ${CALENDARDIR} ${ROOT_USER} ${MAIL_GROUP} 0755 -OWN_DIRS_PERMS+= ${CALENDARDIR}/public ${ROOT_USER} ${MAIL_GROUP} 0755 -OWN_DIRS_PERMS+= ${CALENDARDIR}/private ${ROOT_USER} ${MAIL_GROUP} 0750 -OWN_DIRS_PERMS+= ${CALENDARDIR}/localcache ${ROOT_USER} ${MAIL_GROUP} 0700 +OWN_DIRS= ${SQWEBMAIL_STATEDIR} +OWN_DIRS_PERMS= ${SQWEBMAIL_CACHEDIR} ${ROOT_USER} ${ROOT_GROUP} 0755 +OWN_DIRS_PERMS+= ${SQWEBMAIL_CALENDARDIR} ${ROOT_USER} ${MAIL_GROUP} 0755 +OWN_DIRS_PERMS+= ${SQWEBMAIL_CALENDARDIR}/public ${ROOT_USER} ${MAIL_GROUP} 0755 +OWN_DIRS_PERMS+= ${SQWEBMAIL_CALENDARDIR}/private ${ROOT_USER} ${MAIL_GROUP} 0750 +OWN_DIRS_PERMS+= ${SQWEBMAIL_CALENDARDIR}/localcache ${ROOT_USER} ${MAIL_GROUP} 0700 SYSCONFTOOL= ${PREFIX}/sbin/sqwebmail.sysconftool GEN_FILES= ldapaddressbook @@ -84,7 +85,7 @@ CONF_FILES_PERMS+= ${DATADIR}/sqwebmail/${FILE} \ ${PKG_SYSCONFDIR}/${FILE} \ ${ROOT_USER} ${ROOT_GROUP} 0755 .endfor -RCD_SCRIPTS= pcpd sqwebmaild +RCD_SCRIPTS= pcpd sqwebmail sqwebmaild .include "../../databases/db/buildlink3.mk" .include "../../devel/gettext-lib/buildlink3.mk" diff --git a/mail/sqwebmail/files/sqwebmail.sh b/mail/sqwebmail/files/sqwebmail.sh new file mode 100644 index 00000000000..365f5511f83 --- /dev/null +++ b/mail/sqwebmail/files/sqwebmail.sh @@ -0,0 +1,53 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: sqwebmail.sh,v 1.1 2004/02/24 01:20:21 jlam Exp $ +# +# KEYWORD: nostart + +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi + +rcd_dir=`@DIRNAME@ $0` + +# NOTE: run_rc_command sets $rc_arg +# +forward_commands() +{ + # Backward compat with NetBSD <1.6: + [ -z "$rc_arg" ] && rc_arg=$_arg + + for file in $COMMAND_LIST; do + $rcd_dir/$file $rc_arg + done +} + +reverse_commands() +{ + # Backward compat with NetBSD <1.6: + [ -z "$rc_arg" ] && rc_arg=$_arg + + REVCOMMAND_LIST= + for file in $COMMAND_LIST; do + REVCOMMAND_LIST="$file $REVCOMMAND_LIST" + done + for file in $REVCOMMAND_LIST; do + $rcd_dir/$file $rc_arg + done +} + +COMMAND_LIST="pcpd sqwebmaild" + +name="samba" +start_cmd="forward_commands" +stop_cmd="reverse_commands" +status_cmd="forward_commands" +extra_commands="reload status" + +if [ -f /etc/rc.subr ]; then + run_rc_command "$1" +else + @ECHO@ -n " ${name}" + _arg="$1" + ${start_cmd} +fi |