summaryrefslogtreecommitdiff
path: root/mail/nullmailer/files/nullmailer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mail/nullmailer/files/nullmailer.sh')
-rw-r--r--mail/nullmailer/files/nullmailer.sh26
1 files changed, 15 insertions, 11 deletions
diff --git a/mail/nullmailer/files/nullmailer.sh b/mail/nullmailer/files/nullmailer.sh
index 7c483ed95b2..bb719f9fb4c 100644
--- a/mail/nullmailer/files/nullmailer.sh
+++ b/mail/nullmailer/files/nullmailer.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: nullmailer.sh,v 1.1 2004/08/30 14:34:11 schmonz Exp $
+# $NetBSD: nullmailer.sh,v 1.2 2005/08/20 02:20:45 schmonz Exp $
#
# PROVIDE: mail
# REQUIRE: LOGIN
@@ -10,16 +10,20 @@ if [ -f /etc/rc.subr ]; then
fi
name="nullmailer"
-rcvar=$name
-
-nullmailer_user="nullmail"
-nullmailer_group="nullmail"
-
+rcvar=${name}
+required_files="@PKG_SYSCONFDIR@/nullmailer/remotes"
+required_files="${required_files} @VARBASE@/spool/nullmailer/trigger"
+required_dirs="@VARBASE@/spool/nullmailer/queue @VARBASE@/spool/nullmailer/tmp"
command="@PREFIX@/libexec/nullmailer/nullmailer-send"
-command_args=" > /dev/null 2>&1 &"
+command_args="2>&1 | logger -t nullmailer -p mail.info &"
-required_files="@PKG_SYSCONFDIR@/nullmailer/remotes /var/spool/nullmailer/trigger"
-required_dirs="/var/spool/nullmailer/queue /var/spool/nullmailer/tmp"
+nullmailer_user="@NULLMAILER_USER@"
+nullmailer_group="@NULLMAILER_GROUP@"
-load_rc_config $name
-run_rc_command "$1"
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO_N@ " ${name}"
+ ${command} ${nullmailer_flags} ${command_args}
+fi