summaryrefslogtreecommitdiffstatshomepage
path: root/notmuch
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2023-10-12 15:21:22 -0500
committerToby Vincent <tobyv@tobyvin.dev>2023-10-12 15:21:22 -0500
commit38b8fd29a6ce554f666db5a47517d1a5308136ca (patch)
treed3e68192ffffa7af421dddcb8cac2661c860390b /notmuch
parent40468910b8a726b4b3329ce19a1863037357a02d (diff)
feat(mail): improved services and install scripts
Diffstat (limited to 'notmuch')
-rw-r--r--notmuch/.config/systemd/user/notmuch.service11
-rwxr-xr-xnotmuch/install.sh10
2 files changed, 21 insertions, 0 deletions
diff --git a/notmuch/.config/systemd/user/notmuch.service b/notmuch/.config/systemd/user/notmuch.service
new file mode 100644
index 0000000..fcbee89
--- /dev/null
+++ b/notmuch/.config/systemd/user/notmuch.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Mailbox indexer service
+Documentation=man:notmuch(1)
+After=mbsync@.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/notmuch new
+
+[Install]
+WantedBy=mbsync@.service
diff --git a/notmuch/install.sh b/notmuch/install.sh
new file mode 100755
index 0000000..12196c8
--- /dev/null
+++ b/notmuch/install.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if ! command -v "notmuch" >/dev/null; then
+ printf "%s: notmuch not found, skipping...\n" "$0"
+ exit 0
+fi
+
+printf "%s: Installing service\n" "$0"
+
+systemctl --user enable --now --no-block notmuch.service