2013-05-03 04:35:22 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Starts pulseaudio.
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
start() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Starting pulseaudio: "
|
2013-05-03 04:35:22 +02:00
|
|
|
umask 077
|
2019-02-13 20:05:47 +01:00
|
|
|
/usr/bin/pulseaudio \
|
|
|
|
--system \
|
|
|
|
--daemonize \
|
|
|
|
--disallow-module-loading \
|
|
|
|
--disallow-exit \
|
|
|
|
--exit-idle-time=-1 \
|
|
|
|
--use-pid-file \
|
|
|
|
--disable-shm
|
2013-05-03 04:35:22 +02:00
|
|
|
echo "OK"
|
|
|
|
}
|
|
|
|
stop() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Stopping pulseaudio: "
|
2019-02-13 20:05:47 +01:00
|
|
|
PULSE_RUNTIME_PATH=/var/run/pulse /usr/bin/pulseaudio --kill
|
2013-05-03 04:35:22 +02:00
|
|
|
echo "OK"
|
|
|
|
}
|
|
|
|
restart() {
|
|
|
|
stop
|
|
|
|
start
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
stop
|
|
|
|
;;
|
|
|
|
restart|reload)
|
|
|
|
restart
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit $?
|
|
|
|
|