summaryrefslogtreecommitdiff
path: root/service/meson.build
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2020-12-04 11:11:04 +0000
committerDaniel Playfair Cal <daniel.playfair.cal@gmail.com>2021-02-08 10:01:18 +1100
commit2781a8684855e4120c9948d8b40880bafafe1b12 (patch)
treed77a7709cfddb6cd6b3027e3f8620c1923247b6c /service/meson.build
parent9f31030aaddb301ff94c6a0e4532e2f14e3b9798 (diff)
downloaddconf-2781a8684855e4120c9948d8b40880bafafe1b12.tar.gz
service: Add a systemd unit for D-Bus activation
On systems using systemd --user and dbus-daemon --session --systemd-activation, this means that dconf is correctly placed in its own cgroup, instead of being part of dbus.service's cgroup. This allows it to be controlled by systemctl --user, have resource limits set and so on. On other systems (in particular those where systemd is not used at all), the SystemdService field is ignored and dbus-daemon will continue to start dconf-service as its own child process ("traditional activation"), making this change harmless to apply. Resolves: https://gitlab.gnome.org/GNOME/dconf/-/issues/24 Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'service/meson.build')
-rw-r--r--service/meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/service/meson.build b/service/meson.build
index 51e3090..a2045e5 100644
--- a/service/meson.build
+++ b/service/meson.build
@@ -10,6 +10,15 @@ configure_file(
install_dir: dbus_session_service_dir,
)
+systemd_service = 'dconf.service'
+
+configure_file(
+ input: systemd_service + '.in',
+ output: systemd_service,
+ configuration: service_conf,
+ install_dir: systemd_userunitdir,
+)
+
lib_sources = [
'dconf-blame.c',
'dconf-keyfile-writer.c',