From ec818adc10f434059a71530831bb6d544f5de991 Mon Sep 17 00:00:00 2001 From: Eduard Toloza Date: Wed, 27 Mar 2019 02:59:19 -0500 Subject: [PATCH] Fix Dbus error when using the systemd service. Before it commit you will get a error related to the Dbus activation because the service was trying to call it as root user but in a different session, the error is like 'Error(Dbus(D-Bus error: Server address of type unix was missing argument path or abstract (org.freedesktop.DBus.Error.BadAddress)'. --- upcheck.service | 7 ++++--- upcheck.timer | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/upcheck.service b/upcheck.service index d37247e..7daa5dd 100644 --- a/upcheck.service +++ b/upcheck.service @@ -1,12 +1,13 @@ [Unit] - Description=Automatically check updates and send notifications via libnotify + Description=Automatically check updates and send notifications via notify-rust After=network-online.target + ConditionUser=!root [Service] - Type=simple + Type=oneshot ExecStart=/usr/bin/upcheck KillMode=process KillSignal=SIGINT [Install] - WantedBy=multi-user.target + WantedBy=default.target diff --git a/upcheck.timer b/upcheck.timer index 3b62257..f74dfbd 100644 --- a/upcheck.timer +++ b/upcheck.timer @@ -1,5 +1,5 @@ [Unit] - Description=Check for ArchLinux available updates every 1.5 hours. + Description=Check for ArchLinux available updates according to OnUnitActiveSec= time, default 1h 30min. [Timer] OnBootSec=10min