nasmon.php 543 B

123456789101112131415161718192021
  1. <?php
  2. //NAS monitoring periodic polling
  3. if (ubRouting::get('action') == 'nasmon') {
  4. if ($alterconf['NASMON_ENABLED']) {
  5. $nasMonProcess = new StarDust('NASMON');
  6. if ($nasMonProcess->notRunning()) {
  7. $nasMonProcess->start();
  8. $nasMon = new NasMon();
  9. $nasMon->saveCheckResults();
  10. $nasMonProcess->stop();
  11. die('OK: NASMON');
  12. } else {
  13. die('SKIP:NASMON_ALREADY_RUNNING');
  14. }
  15. } else {
  16. die('ERROR: NASMON DISABLED');
  17. }
  18. }