S50pulseaudio 557 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/sh
  2. #
  3. # Starts pulseaudio.
  4. #
  5. start() {
  6. printf "Starting pulseaudio: "
  7. umask 077
  8. /usr/bin/pulseaudio \
  9. --system \
  10. --daemonize \
  11. --disallow-module-loading \
  12. --disallow-exit \
  13. --exit-idle-time=-1 \
  14. --use-pid-file \
  15. --disable-shm
  16. echo "OK"
  17. }
  18. stop() {
  19. printf "Stopping pulseaudio: "
  20. PULSE_RUNTIME_PATH=/var/run/pulse /usr/bin/pulseaudio --kill
  21. echo "OK"
  22. }
  23. restart() {
  24. stop
  25. start
  26. }
  27. case "$1" in
  28. start)
  29. start
  30. ;;
  31. stop)
  32. stop
  33. ;;
  34. restart|reload)
  35. restart
  36. ;;
  37. *)
  38. echo "Usage: $0 {start|stop|restart}"
  39. exit 1
  40. esac
  41. exit $?