Changeset 4421

Show
Ignore:
Timestamp:
07/17/07 19:22:36 (6 years ago)
Author:
p_lindheimer
Message:

modify error checking on crontab -l since it returns an error when no entries are there and that is not an error

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.3/amp_conf/bin/retrieve_conf

    r4419 r4421  
    519519  global $nt; 
    520520 
     521  // crontab appears to return an error when no entries, os only fail if error returned AND a list of entries. 
     522  // Don't know if this will ever happen, but a failure and a list could indicate something wrong. 
     523  // 
    521524  exec("/usr/bin/crontab -l", $outlines, $ret); 
    522   if ($ret) { 
     525  if ($ret && count($outlines)) { 
    523526    $nt->add_error('retrieve_conf', 'CRONMGR', _("Failed to check crontab for cron manager"), sprintf(_("crontab returned %s error code when checking for crontab entries to start freepbx-cron-scheduler.php crontab manager"),$ret)); 
    524527  } else {