mcelog.init 544 B

1234567891011121314151617181920212223242526272829
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2012 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. description='Start/stop mcelog in daemon mode'
  5. PIDFILE="/var/run/mcelog.pid"
  6. depend() {
  7. after udev
  8. need localmount
  9. use logging
  10. }
  11. start() {
  12. ebegin "Starting mcelog"
  13. start-stop-daemon \
  14. --start \
  15. --pidfile ${PIDFILE} \
  16. --exec /usr/sbin/mcelog -- --daemon --pidfile ${PIDFILE} ${MCELOG_OPTS}
  17. eend $?
  18. }
  19. stop() {
  20. ebegin "Stopping mcelog"
  21. start-stop-daemon --stop --pidfile ${PIDFILE}
  22. eend $?
  23. }