From: Mark Huang Date: Wed, 29 Mar 2006 00:01:35 +0000 (+0000) Subject: - fix -ne bug X-Git-Tag: myplc-0_4-rc1~117 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3267e96a1a4cc4efa563e635645045065609999f;p=myplc.git - fix -ne bug - don't send mail from cron if mail is not globally enabled --- diff --git a/guest.init b/guest.init index 6cd8beb..aa59bbc 100755 --- a/guest.init +++ b/guest.init @@ -6,7 +6,7 @@ # # description: Manages all PLC services on this machine # -# $Id: guest.init,v 1.3 2006/03/27 22:03:38 mlhuang Exp $ +# $Id: guest.init,v 1.4 2006/03/28 20:47:57 mlhuang Exp $ # PATH=/sbin:/bin:/usr/bin:/usr/sbin @@ -499,7 +499,7 @@ config_api () { case "$1" in start) - if [ "$PLC_API_ENABLED" -ne 1 ] ; then + if [ "$PLC_API_ENABLED" != "1" ] ; then return fi @@ -521,10 +521,15 @@ config_cron () { case "$1" in start) + if [ "$PLC_MAIL_ENABLED" = "1" ] ; then + MAILTO=$PLC_MAIL_SUPPORT_ADDRESS + else + MAILTO= + fi cat >/etc/cron.d/plc.cron <