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 <oleksandr@natalenko.name>
This commit is contained in:
Oleksandr Natalenko 2020-10-04 20:08:55 +02:00
parent aeb46ab5a9
commit 1de3632620

View file

@ -4,4 +4,5 @@ Documentation=https://vdirsyncer.readthedocs.org/
[Service]
ExecStart=/usr/bin/vdirsyncer sync
Type=oneshot
RuntimeMaxSec=30s
Restart=on-failure