pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/sqwebmail Add a convenience control script /etc/r...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c4d25b79c84c
branches:  trunk
changeset: 469486:c4d25b79c84c
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Feb 24 01:20:21 2004 +0000

description:
Add a convenience control script /etc/rc.d/sqwebmail that invokes
sqwebmaild and pcpd.

diffstat:

 mail/sqwebmail/Makefile           |  29 +++++++++++----------
 mail/sqwebmail/files/sqwebmail.sh |  53 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 14 deletions(-)

diffs (125 lines):

diff -r 511450723664 -r c4d25b79c84c mail/sqwebmail/Makefile
--- a/mail/sqwebmail/Makefile   Tue Feb 24 01:18:52 2004 +0000
+++ b/mail/sqwebmail/Makefile   Tue Feb 24 01:20:21 2004 +0000
@@ -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 @@
 .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 @@
 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 @@
                        ${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 -r 511450723664 -r c4d25b79c84c mail/sqwebmail/files/sqwebmail.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqwebmail/files/sqwebmail.sh Tue Feb 24 01:20:21 2004 +0000
@@ -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



Home | Main Index | Thread Index | Old Index