From 2e9f70d49647d47fb4ca05f428c592b0e4319544 Mon Sep 17 00:00:00 2001 From: LaserEyess Date: Sat, 1 Oct 2022 09:33:38 -0400 Subject: [PATCH] Do not inhibit idle in borgmatic.service When backing up a machine with a monitor using logind to control idle timeout and things like DPMS, borgmatic can block the screen from turning on/off with systemd-inhibit. This is because by default systemd-inhibit will block "idle:sleep:shutdown". Borgmatic does not need to care about idle, only about suspend and shutdown. So, add an explicit `--what` flag for what borgmatic should inhibit. For more information see systemd-inhibit(1). --- sample/systemd/borgmatic.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/systemd/borgmatic.service b/sample/systemd/borgmatic.service index a07d459e0..3b2dff654 100644 --- a/sample/systemd/borgmatic.service +++ b/sample/systemd/borgmatic.service @@ -61,4 +61,4 @@ LogRateLimitIntervalSec=0 # Delay start to prevent backups running during boot. Note that systemd-inhibit requires dbus and # dbus-user-session to be installed. ExecStartPre=sleep 1m -ExecStart=systemd-inhibit --who="borgmatic" --why="Prevent interrupting scheduled backup" /root/.local/bin/borgmatic --verbosity -1 --syslog-verbosity 1 +ExecStart=systemd-inhibit --who="borgmatic" --what="sleep:shutdown" --why="Prevent interrupting scheduled backup" /root/.local/bin/borgmatic --verbosity -1 --syslog-verbosity 1