summaryrefslogtreecommitdiffstats
path: root/mail/qmail
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2001-03-13 05:47:01 +0000
committerlioux <lioux@FreeBSD.org>2001-03-13 05:47:01 +0000
commitc96062184e968a523a636388dc5c1e5bac6b20db (patch)
treed44c075633a0d56ba363e0b4429ef344f7d52dcd /mail/qmail
parentba77438a81cfc693c9eae07bd8c03e41919bf15e (diff)
downloadFreeBSD-ports-c96062184e968a523a636388dc5c1e5bac6b20db.zip
FreeBSD-ports-c96062184e968a523a636388dc5c1e5bac6b20db.tar.gz
Add {start|stop} support to the initialization (rc.d style) scripts.
Also, add a informational message if the user does not use the scripts correctly.
Diffstat (limited to 'mail/qmail')
-rw-r--r--mail/qmail/Makefile5
-rw-r--r--mail/qmail/files/maildir16
2 files changed, 15 insertions, 6 deletions
diff --git a/mail/qmail/Makefile b/mail/qmail/Makefile
index c75f660..463283d 100644
--- a/mail/qmail/Makefile
+++ b/mail/qmail/Makefile
@@ -285,10 +285,7 @@ thereal-post-patch:
.for i in ${BOOTFILES}
@if [ `dirname $i` != ${FILESDIR} ] ; \
then \
- ${CP} $i.sh $i.sh.orig; \
- (head -c `${EXPR} \`ls -l $i.sh.orig \
- | ${AWK} '{print $$5}'\` - 1` $i.sh.orig ; ${ECHO} '&') \
- > $i.sh ; \
+ ${PERL} -pi.orig -ne 's!^(exec)!case "\$$1" in\nstart)\n\t\1!;s!(qmail)$$!\1\&\n\texit 0\n\t;;\nstop)\n\texec killall qmail-send\n\t;;\n*)\n\t${ECHO} "Usage: `basename \$$0` {start|stop}" >&2\n\texit 64\n\t;;\nesac!' $i.sh ; \
fi
.endfor
@${SED} s!/var/qmail/!${PREFIX}/!g ${FILESDIR}/mailer.conf.sample > \
diff --git a/mail/qmail/files/maildir b/mail/qmail/files/maildir
index 1992e9f..de9c279 100644
--- a/mail/qmail/files/maildir
+++ b/mail/qmail/files/maildir
@@ -3,5 +3,17 @@
# Using splogger to send the log through syslog.
# Using qmail-local to deliver messages to Maildir format by default
-exec env - PATH="@PREFIX@/qmail/bin:$PATH" \
-qmail-start ./Maildir/ splogger qmail &
+case "$1" in
+start)
+ exec env - PATH="@PREFIX@/qmail/bin:$PATH" \
+ qmail-start ./Maildir/ splogger qmail&
+ exit 0
+ ;;
+stop)
+ exec killall qmail-send
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ exit 64
+ ;;
+esac
OpenPOWER on IntegriCloud