From 2acea3ea54774407543d7b5a67ddda3e9105c4ff Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Sat, 19 Sep 2020 11:10:40 +0100 Subject: [PATCH] Makes systemd handle davmail and regular inbox checks --- davmail/.config/systemd/user/checkemails@.service | 10 ++++++++++ davmail/.config/systemd/user/checkemails@inbox.timer | 9 +++++++++ davmail/.config/systemd/user/davmail.service | 10 ++++++++++ 3 files changed, 29 insertions(+) create mode 100644 davmail/.config/systemd/user/checkemails@.service create mode 100644 davmail/.config/systemd/user/checkemails@inbox.timer create mode 100644 davmail/.config/systemd/user/davmail.service diff --git a/davmail/.config/systemd/user/checkemails@.service b/davmail/.config/systemd/user/checkemails@.service new file mode 100644 index 00000000..9bc0c630 --- /dev/null +++ b/davmail/.config/systemd/user/checkemails@.service @@ -0,0 +1,10 @@ +[Unit] +Description=Check emails for %i +After=davmail.service +Requires=davmail.service + +[Service] +ExecStart=/home/jonathan/.bin/emails/check-emails %i + +[Install] +WantedBy=default.target diff --git a/davmail/.config/systemd/user/checkemails@inbox.timer b/davmail/.config/systemd/user/checkemails@inbox.timer new file mode 100644 index 00000000..4d155483 --- /dev/null +++ b/davmail/.config/systemd/user/checkemails@inbox.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Check Inbox Every Minute + +[Timer] +OnBootSec=1min +OnUnitActiveSec=1min + +[Install] +WantedBy=timers.target diff --git a/davmail/.config/systemd/user/davmail.service b/davmail/.config/systemd/user/davmail.service new file mode 100644 index 00000000..fdd064c7 --- /dev/null +++ b/davmail/.config/systemd/user/davmail.service @@ -0,0 +1,10 @@ +[Unit] +Description=DavMail for Work + +[Service] +ExecStart=/usr/bin/davmail %h/.config/davmail/davmail.properties.secret +Restart=on-failure + +[Install] +WantedBy=default.target +DefaultInstance=davmail