From 1de3632620c01887317fb54341ce75f3290bfa7e Mon Sep 17 00:00:00 2001 From: Oleksandr Natalenko Date: Sun, 4 Oct 2020 20:08:55 +0200 Subject: [PATCH] contrib/systemd: implement service timeout Sometimes while doing a suspend/resume cycle vdirsyncer can hang in the middle of sync, and it never bails out afterwards. Implement a systemd service change that works around this: * use `simple` (a default) type for `RuntimeMaxSec` to be effective * actually set `RuntimeMaxSec` to 30 seconds * trigger service restart on failure Signed-off-by: Oleksandr Natalenko --- contrib/vdirsyncer.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/vdirsyncer.service b/contrib/vdirsyncer.service index b69d5a6..ac5c45c 100644 --- a/contrib/vdirsyncer.service +++ b/contrib/vdirsyncer.service @@ -4,4 +4,5 @@ Documentation=https://vdirsyncer.readthedocs.org/ [Service] ExecStart=/usr/bin/vdirsyncer sync -Type=oneshot +RuntimeMaxSec=30s +Restart=on-failure