herd.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. if (ubRouting::get('action') == 'herd') {
  3. if ($alterconf['PON_ENABLED']) {
  4. if (ubRouting::checkGet('oltid')) {
  5. /**
  6. *
  7. * |\ /|
  8. * ___| \,,/_/
  9. * ---__/ \/ \
  10. * __--/ (D) \
  11. * _ -/ (_ \
  12. * // / \_ / ==\
  13. * __-------_____--___--/ / \_ O o)
  14. * / / \==/
  15. * / /
  16. * || ) \_/\
  17. * || / _ / |
  18. * | | /--______ ___\ /\ :
  19. * | / __- - _/ ------ | | \ \
  20. * | - - / | | \ )
  21. * | | - | | ) | |
  22. * | | | | | | | |
  23. * | | < | | | |_/
  24. * < | /__\ < \
  25. * /__\ /___\
  26. */
  27. $oltId = ubRouting::get('oltid', 'int');
  28. $compressorProcess = new StarDust(ONUSigCompressor::PID);
  29. if ($compressorProcess->notRunning()) {
  30. $pony = new PONizer();
  31. $pony->pollOltSignal($oltId);
  32. die('OK:HERD');
  33. } else {
  34. log_register('PON HERD OLT ['.$oltId.'] SKIPPED DUE COMPRESSOR RUNNING');
  35. die('SKIPPED:HERD');
  36. }
  37. } else {
  38. die('ERROR:NO_OLTID');
  39. }
  40. } else {
  41. die('ERROR:PON_DISABLED');
  42. }
  43. }