summaryrefslogtreecommitdiff
path: root/mail/courier-imap/files/courierpops.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mail/courier-imap/files/courierpops.sh')
-rwxr-xr-xmail/courier-imap/files/courierpops.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/mail/courier-imap/files/courierpops.sh b/mail/courier-imap/files/courierpops.sh
index 68e672914f4..9946a3f0ec1 100755
--- a/mail/courier-imap/files/courierpops.sh
+++ b/mail/courier-imap/files/courierpops.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: courierpops.sh,v 1.17 2007/09/22 04:42:03 jlam Exp $
+# $NetBSD: courierpops.sh,v 1.18 2008/02/19 18:45:14 jlam Exp $
#
# Courier POP3/SSL services daemon
#
@@ -17,9 +17,25 @@ ctl_command="@PREFIX@/sbin/pop3d-ssl"
pidfile="@COURIER_STATEDIR@/tmp/pop3d-ssl.pid"
required_files="@PKG_SYSCONFDIR@/pop3d @PKG_SYSCONFDIR@/pop3d-ssl"
+start_precmd="${name}_prestart"
start_cmd="${name}_doit start"
stop_cmd="${name}_doit stop"
+mkdir_perms()
+{
+ dir="$1"; user="$2"; group="$3"; mode="$4"
+ @TEST@ -d $dir || @MKDIR@ $dir
+ @CHOWN@ $user $dir
+ @CHGRP@ $group $dir
+ @CHMOD@ $mode $dir
+}
+
+courierpops_prestart()
+{
+ mkdir_perms @COURIER_STATEDIR@/tmp \
+ @COURIER_USER@ @COURIER_GROUP@ 0770
+}
+
courierpops_doit()
{
action=$1