bumblebeed 616 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. #
  3. # /etc/rc.d/bumblebeed: start/stop bumblebeed
  4. #
  5. SSD=/sbin/start-stop-daemon
  6. PROG=/usr/sbin/bumblebeed
  7. OPTS="--daemon"
  8. case $1 in
  9. start)
  10. $SSD --start --exec $PROG -- $OPTS
  11. ;;
  12. stop)
  13. $SSD --stop --retry 10 --exec $PROG
  14. ;;
  15. restart)
  16. $0 stop
  17. sleep 1
  18. $0 start
  19. ;;
  20. status)
  21. $SSD --status --exec $PROG
  22. case $? in
  23. 0) echo "$PROG is running with pid $(pidof $PROG)" ;;
  24. 1) echo "$PROG is not running but the pid file $PID exists" ;;
  25. 3) echo "$PROG is not running" ;;
  26. 4) echo "Unable to determine the program status" ;;
  27. esac
  28. ;;
  29. *)
  30. echo "usage: $0 [start|stop|restart|status]"
  31. ;;
  32. esac
  33. # End of file