summaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorclive <clive@FreeBSD.org>2004-03-27 03:59:28 +0000
committerclive <clive@FreeBSD.org>2004-03-27 03:59:28 +0000
commita556738d17fbb7d1fad58414ea845c9f54c14384 (patch)
tree09c2fcd2fa5992190b877ab9a64d99db66b2cad3 /mail
parent66e1ccac4bd830903e20622768e4b1d4b421e8fa (diff)
downloadFreeBSD-ports-a556738d17fbb7d1fad58414ea845c9f54c14384.zip
FreeBSD-ports-a556738d17fbb7d1fad58414ea845c9f54c14384.tar.gz
More chances to catch correct PID.
No functional change.
Diffstat (limited to 'mail')
-rw-r--r--mail/nullmailer/files/nullmail.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/mail/nullmailer/files/nullmail.sh b/mail/nullmailer/files/nullmail.sh
index 15f5d52..d32df5c 100644
--- a/mail/nullmailer/files/nullmail.sh
+++ b/mail/nullmailer/files/nullmail.sh
@@ -16,6 +16,7 @@ RM=/bin/rm
LOGGER=/usr/bin/logger
KILL=/bin/kill
KILLALL=/usr/bin/killall
+HEAD=/usr/bin/head
PRIORITY=local5.info
TAG=${NULLMAILUSER}
@@ -26,7 +27,7 @@ start)
if [ ! -r ${PIDFILE} ] ; then
[ -x ${PREFIX}/sbin/nullmailer-send ] && su -l ${NULLMAILUSER} -c "${PREFIX}/sbin/nullmailer-send 2>&1 | ${LOGGER} -i -p ${PRIORITY} -t ${TAG} &"
JUNK=`${PS} -ax`
- PID=`${PS} awx | ${GREP} -v awk | ${AWK} '/nullmailer-send/ {print $1}'`
+ PID=`${PS} awx | ${GREP} -v awk | ${AWK} '/nullmailer-send/ {print $1}' | ${HEAD} -1`
echo $PID > ${PIDFILE}
else
echo ' already running'
OpenPOWER on IntegriCloud