init.d 630 B

12345678910111213141516171819202122232425262728
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2010 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. checkconfig() {
  5. if [ ! -f /etc/supervisord.conf ] ; then
  6. eerror "Please create /etc/supervisord.conf:"
  7. eerror "echo_supervisord_conf >> /etc/supervisord.conf"
  8. return 1
  9. fi
  10. return 0
  11. }
  12. start() {
  13. checkconfig || return $?
  14. ebegin "Starting supervisord"
  15. start-stop-daemon --start \
  16. --exec /usr/bin/supervisord -b --pidfile /var/run/supervisord.pid \
  17. -- -n ${SUPD_OPTS}
  18. eend $?
  19. }
  20. stop() {
  21. ebegin "Stopping supervisord"
  22. start-stop-daemon --stop --pidfile /var/run/supervisord.pid
  23. eend $?
  24. }