diff options
author | Benjamin Berg <bberg@redhat.com> | 2019-12-13 16:24:19 +0100 |
---|---|---|
committer | Benjamin Berg <benjamin@sipsolutions.net> | 2020-07-31 08:53:12 +0000 |
commit | 3acdc124699cfc186fbe15e828db2c23f43b6591 (patch) | |
tree | 51acb15970fff6b2fb3683f41133f63fd75438ec /plugins/gsd.service.in | |
parent | 9108152de8227a1a2d3df3444046e18df6fcd041 (diff) | |
download | gnome-settings-daemon-3acdc124699cfc186fbe15e828db2c23f43b6591.tar.gz |
plugins: Update systemd unit design and generate them
Rather than having per-plugin units, generate them from the meson build
file using a common template.
The unit layout is changed somewhat. The .target file now is solely a
flag on whether the service is requested for the session type. The
variosu requirements are all moved into the .service file.
Instead of using an OnFailure and trying to contain the dependency
errors in a separate unit, we now use ExecStopPost. It seems that the
current approach has never worked anyway.
The Conflict entries on certain session types are gone now. This is
instead handled outside of gnome-settings-daemon.
Diffstat (limited to 'plugins/gsd.service.in')
-rw-r--r-- | plugins/gsd.service.in | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/gsd.service.in b/plugins/gsd.service.in new file mode 100644 index 00000000..31fa3e96 --- /dev/null +++ b/plugins/gsd.service.in @@ -0,0 +1,25 @@ +[Unit] +Description=@description@ service +CollectMode=inactive-or-failed +RefuseManualStart=true +RefuseManualStop=true + +After=gnome-session-initialized.target + +# Requisite/PartOf means the dependency is not loaded automatically. +# The ordering here also implies Before=gnome-session.target +Requisite=gsd-@plugin_name@.target +PartOf=gsd-@plugin_name@.target +Before=gsd-@plugin_name@.target + +@plugin_gate_units_section@ + +[Service] +Type=dbus +ExecStart=@libexecdir@/gsd-@plugin_name@ +Restart=@plugin_restart@ +BusName=@plugin_dbus_name@ +TimeoutStopSec=5 +# We cannot use OnFailure as e.g. dependency failures are normal +# https://github.com/systemd/systemd/issues/12352 +ExecStopPost=@libexecdir@/gnome-session-ctl --exec-stop-check |