You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
968 B

  1. #!/bin/bash
  2. source /app/run.pids
  3. ERRORS=0
  4. if [ -n "${PID_LOGROTATE}" -a -e /proc/${PID_LOGROTATE} ]; then
  5. echo 'SUCCESS: odrive log rotator running'
  6. else
  7. ((ERRORS++))
  8. echo 'ERROR: odrive log rotator not running'
  9. fi
  10. if [ -n "${PID_ODRIVEAGENT}" -a -e /proc/${PID_ODRIVEAGENT} ]; then
  11. echo 'SUCCESS: odrive agent running'
  12. else
  13. ((ERRORS++))
  14. echo 'ERROR: odrive agent not running'
  15. fi
  16. if [ -n "${PID_ODRIVEREFRESH}" -a -e /proc/${PID_ODRIVEREFRESH} ]; then
  17. echo 'SUCCESS: odrive refresh running'
  18. else
  19. ((ERRORS++))
  20. echo 'ERROR: odrive refresh not running'
  21. fi
  22. if [ -n "${PID_ODRIVETRASH}" -a -e /proc/${PID_ODRIVETRASH} ]; then
  23. echo 'SUCCESS: odrive empty trash running'
  24. else
  25. ((ERRORS++))
  26. echo 'ERROR: odrive empty trash not running'
  27. fi
  28. if [ -n "${PID_ODRIVESYNC}" -a -e /proc/${PID_ODRIVESYNC} ]; then
  29. echo 'SUCCESS: odrive sync running'
  30. else
  31. ((ERRORS++))
  32. echo 'ERROR: odrive sync not running'
  33. fi
  34. if [ "${ERRORS}" -gt 0 ]; then
  35. exit 1
  36. fi