would otherwise cause a chown of the trigger file. (with DESTDIR, the "nullmail" user & group are not yet created) Because this leaves the trigger file possibly owned by root, add a test in the rc "start" path to [re]make it when necessary. put this test and the daemon background and logging into a separate script so that it can be run by the rc framework as the nullmail user in the normal way, and add a procname argument to allow the "status" and "stop" rc commands to work properly. bump PKGREVISION
13 lines
371 B
Bash
13 lines
371 B
Bash
#!/bin/sh
|
|
#
|
|
# ensure that the trigger fifo exists and we own it, then start up
|
|
# nullmailer-send with logging and detach
|
|
|
|
trigger="@VARBASE@/spool/nullmailer/trigger"
|
|
|
|
if [ ! -p ${trigger} -o ! -O ${trigger} -o ! -G ${trigger} ]; then
|
|
rm -f ${trigger}
|
|
mkfifo -m 0600 ${trigger}
|
|
fi
|
|
|
|
@PREFIX@/libexec/nullmailer/nullmailer-send 2>&1 | logger -t nullmailer -p mail.info &
|