summaryrefslogtreecommitdiffstats
path: root/plugins/gsd.service.in
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--plugins/gsd.service.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/gsd.service.in b/plugins/gsd.service.in
new file mode 100644
index 0000000..c47a676
--- /dev/null
+++ b/plugins/gsd.service.in
@@ -0,0 +1,26 @@
+[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=@plugin_dbus_name@.target
+PartOf=@plugin_dbus_name@.target
+Before=@plugin_dbus_name@.target
+
+@plugin_gate_units_section@
+
+[Service]
+Slice=session.slice
+Type=dbus
+ExecStart=@libexecdir@/gsd-@plugin_name@
+Restart=on-failure
+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