S10brltty 582 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. #
  3. # brltty Starts brltty.
  4. #
  5. start() {
  6. printf "Starting brltty: "
  7. start-stop-daemon -S -q -p /var/run/brltty.pid \
  8. --exec /usr/bin/brltty -- -P /var/run/brltty.pid "$@"
  9. [ $? = 0 ] && echo "OK" || echo "FAIL"
  10. }
  11. stop() {
  12. printf "Stopping brltty: "
  13. start-stop-daemon -K -q -p /var/run/brltty.pid
  14. [ $? = 0 ] && echo "OK" || echo "FAIL"
  15. }
  16. restart() {
  17. stop
  18. start "$@"
  19. }
  20. case "$1" in
  21. start)
  22. start
  23. ;;
  24. stop)
  25. stop
  26. ;;
  27. restart|reload)
  28. restart
  29. ;;
  30. force-reload)
  31. restart
  32. ;;
  33. *)
  34. echo "Usage: $0 {start|stop|restart|force-reload}"
  35. exit 1
  36. esac
  37. exit $?