From c0820eabf41727b30c96d974163f97b28ead036e Mon Sep 17 00:00:00 2001 From: josiah Date: Wed, 15 Jun 2022 12:14:20 -0500 Subject: [PATCH] Add offlineimap systemd timers. --- .config/systemd/user/offlineimap-oneshot.service | 10 ++++++++++ .config/systemd/user/offlineimap-oneshot.timer | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100644 .config/systemd/user/offlineimap-oneshot.service create mode 100644 .config/systemd/user/offlineimap-oneshot.timer diff --git a/.config/systemd/user/offlineimap-oneshot.service b/.config/systemd/user/offlineimap-oneshot.service new file mode 100644 index 0000000..7664ca6 --- /dev/null +++ b/.config/systemd/user/offlineimap-oneshot.service @@ -0,0 +1,10 @@ +[Unit] +Description=Run offlineimap with my specifications +After=network.target + +[Service] +ExecStart=/run/current-system/sw/bin/docker run -v /home/josiah/.config/offlineimap/:/mnt/config -v /home/josiah/qj/fastmail:/mnt/mail -v /home/josiah/qj/mail.log:/mnt/log -e MAILLOG=TRUE maxkratz/offlineimap:latest +TimeoutStartSec=3600 + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/offlineimap-oneshot.timer b/.config/systemd/user/offlineimap-oneshot.timer new file mode 100644 index 0000000..3693f6f --- /dev/null +++ b/.config/systemd/user/offlineimap-oneshot.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run offlineimap every 30 minutes + +[Timer] +OnBootSec=30min +OnUnitActiveSec=1day + +[Install] +WantedBy=timers.target