summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2020-12-03 12:39:20 +0000
committerSimon McVittie <smcv@debian.org>2020-12-03 16:12:05 +0000
commitd82db7c123d8b346834bd7680073d5ae1882868d (patch)
tree69be4fbc8f5fe8d3581888f04304daae834c68d1 /tools
parent9de6e40f12e8878f524f8d429d85724c156a0517 (diff)
downloadgnome-session-d82db7c123d8b346834bd7680073d5ae1882868d.tar.gz
Stop dbus-daemon instead of restarting it
On systems where dbus-daemon is a systemd user service, it is always socket-activatable, so it will be restarted on-demand by dbus.socket. On systems where it is not, neither StopUnit nor TryRestartUnit will do anything. Either way, there doesn't seem much point in immediately restarting it. If the job contradicts jobs that are already queued, fail with a warning instead of replacing those jobs. Related to #74. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/gnome-session-ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gnome-session-ctl.c b/tools/gnome-session-ctl.c
index 8d94f844..eb9d6b5f 100644
--- a/tools/gnome-session-ctl.c
+++ b/tools/gnome-session-ctl.c
@@ -127,10 +127,10 @@ do_restart_dbus (void)
SYSTEMD_DBUS,
SYSTEMD_PATH_DBUS,
SYSTEMD_INTERFACE_DBUS,
- "TryRestartUnit",
+ "StopUnit",
g_variant_new ("(ss)",
"dbus.service",
- "replace"),
+ "fail"),
NULL,
G_DBUS_CALL_FLAGS_NO_AUTO_START,
-1, NULL, &error);