From bf85746923a786b6913ecef93890e201a283d382 Mon Sep 17 00:00:00 2001 From: benutzer193 Date: Tue, 28 Mar 2017 08:19:24 +0200 Subject: [PATCH] Create systemd oneshot services Signed-off-by: benutzer193 Signed-off-by: Nicolas Sebrecht --- contrib/systemd/offlineimap-oneshot.service | 13 +++++++++++++ contrib/systemd/offlineimap-oneshot@.service | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100644 contrib/systemd/offlineimap-oneshot.service create mode 100644 contrib/systemd/offlineimap-oneshot@.service diff --git a/contrib/systemd/offlineimap-oneshot.service b/contrib/systemd/offlineimap-oneshot.service new file mode 100644 index 0000000..480ed6e --- /dev/null +++ b/contrib/systemd/offlineimap-oneshot.service @@ -0,0 +1,13 @@ +[Unit] +Description=Offlineimap Service (oneshot) + +[Service] +Type=oneshot +ExecStart=/usr/bin/offlineimap -o -u syslog +# Give 12 seconds for offlineimap to gracefully stop before hard killing it. +TimeoutStopSec=12 +#Restart=on-watchdog +#WatchdogSec=300 + +[Install] +WantedBy=mail.target diff --git a/contrib/systemd/offlineimap-oneshot@.service b/contrib/systemd/offlineimap-oneshot@.service new file mode 100644 index 0000000..57a370a --- /dev/null +++ b/contrib/systemd/offlineimap-oneshot@.service @@ -0,0 +1,11 @@ +[Unit] +Description=Offlineimap Service for account %i (oneshot) + +[Service] +Type=oneshot +ExecStart=/usr/bin/offlineimap -o -a %i -u syslog +#Restart=on-watchdog +#WatchdogSec=300 + +[Install] +WantedBy=mail.target