[pulseaudio-discuss] [PATCH] launch: Add systemd units for launching pulseaudio user instances

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Fri Oct 24 02:28:17 PDT 2014


On Mon, 2014-10-20 at 11:54 +0100, Colin Guthrie wrote:
> ---
>  configure.ac                                  | 11 +++++++++++
>  src/Makefile.am                               | 12 +++++++++++-
>  src/daemon/systemd/user/pulseaudio.service.in | 10 ++++++++++
>  src/daemon/systemd/user/pulseaudio.socket     | 10 ++++++++++
>  4 files changed, 42 insertions(+), 1 deletion(-)
>  create mode 100644 src/daemon/systemd/user/pulseaudio.service.in
>  create mode 100644 src/daemon/systemd/user/pulseaudio.socket
> 
> diff --git a/configure.ac b/configure.ac
> index 3a249d0..6c9690f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1199,6 +1199,13 @@ AS_IF([test "x$HAVE_SYSTEMD" = "x1"],
>          HAVE_SYSTEMD_JOURNAL=1
>      ])
>  
> +AC_ARG_WITH([systemduserunitdir],
> +        AS_HELP_STRING([--with-systemduserunitdir=DIR], [Directory for systemd user service files]),

The convention in PA seems to be to use more dashes:
--with-systemd-user-unit-dir

> --- /dev/null
> +++ b/src/daemon/systemd/user/pulseaudio.service.in
> @@ -0,0 +1,10 @@
> +[Unit]
> +Description=Sound Service
> +
> +[Service]
> +ExecStart=@PA_BINARY@
> +Restart=always
> +
> +[Install]
> +Also=pulseaudio.socket
> +WantedBy=default.target

Given that we have socket activation, what is the benefit of starting
PulseAudio unconditionally as part of default.target? We'll probably
patch the WantedBy line out in Tizen (we have a policy to not start
services on demand, so we have so far relied on autospawning alone to
start PulseAudio).

-- 
Tanu



More information about the pulseaudio-discuss mailing list