mcollectived.initd 497 B

1234567891011121314151617181920212223242526272829
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2012 Gentoo Foundation
  3. # Distributed under the terms of the Apache License, Version 2.0
  4. mcollectived="/usr/sbin/mcollectived"
  5. pidfile="/var/run/mcollectived"
  6. depend() {
  7. need net
  8. }
  9. start() {
  10. ebegin "Starting mcollectived"
  11. ${mcollectived} --pid=${pidfile} --config="/etc/mcollective/server.cfg"
  12. eend $?
  13. }
  14. stop() {
  15. ebegin "Stopping mcollectived"
  16. kill `cat ${pidfile}`
  17. eend $?
  18. }
  19. restart() {
  20. svc_stop
  21. sleep 2
  22. svc_start
  23. }