From 8a8254d2ee739c3d444d71d5cdd349fc2a33e126 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 19 Jan 2019 11:11:04 +0100 Subject: [PATCH] Remove maximal runtime for git-annex assistant The assistant should instead be restarted on resume, preferably by another service file, installed on system level. --- .../systemd/system/stop-git-annex-after-sleep.service | 10 ++++++++++ config/systemd/user/git-annex-assistant@.service | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 config/systemd/system/stop-git-annex-after-sleep.service diff --git a/config/systemd/system/stop-git-annex-after-sleep.service b/config/systemd/system/stop-git-annex-after-sleep.service new file mode 100644 index 0000000..beb0786 --- /dev/null +++ b/config/systemd/system/stop-git-annex-after-sleep.service @@ -0,0 +1,10 @@ +[Unit] +Description=Kill git-annex assistant after resume +After=sleep.target + +[Service] +Type=oneshot +ExecStart=pkill -f "^/usr/bin/git-annex assistant" + +[Install] +WantedBy=sleep.target diff --git a/config/systemd/user/git-annex-assistant@.service b/config/systemd/user/git-annex-assistant@.service index 90cdf5e..440df39 100644 --- a/config/systemd/user/git-annex-assistant@.service +++ b/config/systemd/user/git-annex-assistant@.service @@ -6,7 +6,6 @@ CPUAccounting=true CPUQuota=20% WorkingDirectory=%I ExecStart=/usr/bin/git-annex assistant --foreground -RuntimeMaxSec=86400 Restart=always [Install]