From 3267e96a1a4cc4efa563e635645045065609999f Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 29 Mar 2006 00:01:35 +0000 Subject: [PATCH] - fix -ne bug - don't send mail from cron if mail is not globally enabled --- guest.init | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 <