3 # pulseaudio PulseAudio system-wide sound server
7 # description: System mode startup script for the PulseAudio sound server.
9 # processname: pulseaudio
10 # config: /etc/sysconfig/pulseaudio
11 # pidfile: /var/run/pulse/pid
16 PULSEAUDIO_SYSTEM_START=0
17 DISALLOW_MODULE_LOADING=1
19 # Get service config - may override defaults
20 [ -f /etc/sysconfig/pulseaudio ] && . /etc/sysconfig/pulseaudio
21 [ "$PULSEAUDIO_SYSTEM_START" != "1" ] && exit 0
23 # Source function library
24 . /etc/rc.d/init.d/functions
27 . /etc/sysconfig/network
30 # Check if the service is already running?
31 if [ -f /var/lock/subsys/pulseaudio ]; then
32 msg_already_running "PulseAudio"
36 msg_starting "PulseAudio"
37 daemon /usr/bin/pulseaudio --system --daemonize --high-priority --log-target=syslog --disallow-module-loading=$DISALLOW_MODULE_LOADING
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pulseaudio
43 if [ ! -f /var/lock/subsys/pulseaudio ]; then
44 msg_not_running "PulseAudio"
49 msg_stopping "PulseAudio"
50 killproc --pidfile /var/run/pulse/pid pulseaudio -TERM
51 rm -f /var/lock/subsys/pulseaudio
55 if [ ! -f /var/lock/subsys/pulseaudio ]; then
56 msg_not_running "PulseAudio"
61 msg_reloading "PulseAudio"
62 killproc --pidfile /var/run/pulse/pid pulseaudio -HUP
67 if [ ! -f /var/lock/subsys/pulseaudio ]; then
68 msg_not_running "PulseAudio"
78 # See how we were called.
101 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"