Add systemd unit and timer files
authorStefan Huber <shuber@sthu.org>
Thu, 11 Jun 2020 18:45:51 +0000 (20:45 +0200)
committerStefan Huber <shuber@sthu.org>
Thu, 11 Jun 2020 18:45:51 +0000 (20:45 +0200)
smailq.service [new file with mode: 0644]
smailq.timer [new file with mode: 0644]

diff --git a/smailq.service b/smailq.service
new file mode 100644 (file)
index 0000000..05961d9
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=smailq delivery service
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/smailq --deliver-all
diff --git a/smailq.timer b/smailq.timer
new file mode 100644 (file)
index 0000000..95a3782
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=smailq delivery timer
+
+[Timer]
+OnBootSec=2m
+OnUnitActiveSec=15m
+Unit=smailq.service
+
+[Install]
+WantedBy=timers.target