From fe9648c46de34c2d98466349f8f73f610a93bbec Mon Sep 17 00:00:00 2001 From: Marc Fiuczynski Date: Fri, 4 Dec 2009 03:26:25 +0000 Subject: [PATCH] only add apache to trusted-users file if its not already in there --- plc.d/mail | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plc.d/mail b/plc.d/mail index fba0973..01441b7 100755 --- a/plc.d/mail +++ b/plc.d/mail @@ -28,7 +28,10 @@ case "$1" in # Add apache to list of users that can send mail as others # without a warning, so that the API can send out mail. - echo "apache" >/etc/mail/trusted-users + count=$(grep ^apache /etc/mail/trusted-users|wc -l) + if [ $count -eq 0 ] ; then + echo "apache" >>/etc/mail/trusted-users + fi (exec 3>&- 4>&- ; service sendmail start) check -- 2.43.0