X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fmail;h=158562202dbc092b5a19f5e90132640d61d47a1f;hb=82d099c7771dd3517bb300552e5b182f49bb27bc;hp=2b3eadefcda02cb87782d979d501ac281a2e374b;hpb=391310e122de0536c08f62bd46acd3b3b7b13964;p=myplc.git diff --git a/plc.d/mail b/plc.d/mail index 2b3eade..1585622 100755 --- a/plc.d/mail +++ b/plc.d/mail @@ -1,14 +1,12 @@ #!/bin/bash # -# priority: 250 +# priority: 200 # # Start local mail server. # # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: mail 554 2007-06-19 15:11:22Z thierry $ -# # Source function library and configuration . /etc/plc.d/functions @@ -28,7 +26,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