monit.init 346 B

123456789101112131415
  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2014 OpenWrt.org
  3. START=60
  4. USE_PROCD=1
  5. PROG=/usr/bin/monit
  6. start_service() {
  7. [ -f /etc/monitrc ] || { echo "monit: /etc/monitrc is missing"; return 1; }
  8. chmod 0600 /etc/monitrc
  9. procd_open_instance
  10. # -I runs in foreground, as procd requires
  11. procd_set_param command "$PROG" -I
  12. procd_close_instance
  13. }