Commit aea1f9db authored by Juho Hamalainen's avatar Juho Hamalainen

Merge branch 'jb49307' into 'master'

Avoid having system and user session daemon running simultaneously.

See merge request !34
parents 5c260d3f 1464ed95
......@@ -9,9 +9,12 @@ Before=multi-user.target systemd-user-sessions.service
PartOf=emergency-call.target
[Service]
Type=forking
PIDFile=%t/pulse/pid
EnvironmentFile=-/etc/sysconfig/pulseaudio
ExecStart=/usr/bin/pulseaudio --daemonize --system --disallow-module-loading $CONFIG
ExecStart=/usr/bin/pulseaudio --daemonize=no --system --disallow-module-loading $CONFIG
# Make sure pid file is cleaned when stopping system PulseAudio,
# as user session service will defer startup until the pid file
# doesn't exist anymore.
ExecStopPost=/bin/sh -c "rm -f /run/pulse/pid"
Restart=always
RestartSec=1
Type=notify
......@@ -4,12 +4,14 @@ After=pre-user-session.target
Requires=dbus.socket
[Service]
Type=forking
PIDFile=%t/pulse/pid
EnvironmentFile=-/etc/sysconfig/pulseaudio
ExecStart=/usr/bin/pulseaudio --start $CONFIG
# Wait until system PulseAudio daemon has completely shut down before
# starting user session daemon.
ExecStartPre=/bin/sh -c "while [ -f /run/pulse/pid ]; do sleep 1; done"
ExecStart=/usr/bin/pulseaudio --daemonize=no $CONFIG
Restart=always
RestartSec=1
Type=notify
[Install]
WantedBy=user-session.target
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment