aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mbsync
diff options
context:
space:
mode:
Diffstat (limited to 'mbsync')
-rw-r--r--mbsync/.config/imapnotify/gmail.conf16
-rw-r--r--mbsync/.config/imapnotify/porkbun.conf14
-rw-r--r--mbsync/.config/systemd/user/mbsync@.service (renamed from mbsync/.config/systemd/user/mbsync.service)2
-rwxr-xr-xmbsync/install.sh25
4 files changed, 10 insertions, 47 deletions
diff --git a/mbsync/.config/imapnotify/gmail.conf b/mbsync/.config/imapnotify/gmail.conf
deleted file mode 100644
index fc109ff..0000000
--- a/mbsync/.config/imapnotify/gmail.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "host": "imap.gmail.com",
- "port": 993,
- "tls": true,
- "tlsOptions": {
- "rejectUnauthorized": false
- },
- "username": "tobyv13@gmail.com",
- "password": "",
- "passwordCmd": "pass gmail | head -n1",
- "onNewMail": "mbsync -c $XDG_CONFIG_HOME/mbsync/mbsyncrc gmail",
- "onNewMailPost": "",
- "boxes": [
- "INBOX"
- ]
-}
diff --git a/mbsync/.config/imapnotify/porkbun.conf b/mbsync/.config/imapnotify/porkbun.conf
deleted file mode 100644
index 60b71f9..0000000
--- a/mbsync/.config/imapnotify/porkbun.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "host": "imap.porkbun.com",
- "port": 993,
- "tls": true,
- "tlsOptions": {
- "rejectUnauthorized": false
- },
- "username": "tobyv@tobyvin.dev",
- "passwordCmd": "pass tobyv@tobyvin.dev | head -n1",
- "onNewMail": "mbsync -c $XDG_CONFIG_HOME/mbsync/mbsyncrc porkbun",
- "boxes": [
- "INBOX"
- ]
-}
diff --git a/mbsync/.config/systemd/user/mbsync.service b/mbsync/.config/systemd/user/mbsync@.service
index 514795f..4089c04 100644
--- a/mbsync/.config/systemd/user/mbsync.service
+++ b/mbsync/.config/systemd/user/mbsync@.service
@@ -7,7 +7,7 @@ After=network-online.target gpg-agent.socket network.target dbus.socket
[Service]
Type=oneshot
-ExecStart=/usr/bin/mbsync -Vac ${XDG_CONFIG_HOME}/mbsync/mbsyncrc
+ExecStart=/usr/bin/mbsync -Vc ${XDG_CONFIG_HOME}/mbsync/mbsyncrc %i
[Install]
WantedBy=default.target
diff --git a/mbsync/install.sh b/mbsync/install.sh
index 7433fea..de06c1a 100755
--- a/mbsync/install.sh
+++ b/mbsync/install.sh
@@ -1,20 +1,13 @@
#!/bin/sh
-printf "%s: Installing services\n" "$0"
-
-if command -v mbsync >/dev/null; then
- systemctl --user enable --now --no-block mbsync.service
- systemctl --user enable --now --no-block maildir-notify@gmail.service
- systemctl --user enable --now --no-block maildir-notify@porkbun.service
-else
- printf "%s: command not found: mbsync\n" "$0"
- exit 1
+if ! command -v "mbsync" >/dev/null; then
+ printf "%s: mbsync not found, skipping...\n" "$0"
+ exit 0
fi
-if command -v goimapnotify >/dev/null; then
- systemctl --user enable --now --no-block goimapnotify@gmail.service
- systemctl --user enable --now --no-block goimapnotify@porkbun.service
-else
- printf "%s: command not found: goimapnotify\n" "$0"
- exit 1
-fi
+printf "%s: Installing services\n" "$0"
+
+systemctl --user enable --now --no-block mbsync@gmail.service
+systemctl --user enable --now --no-block mbsync@porkbun.service
+systemctl --user enable --now --no-block maildir-notify@gmail.service
+systemctl --user enable --now --no-block maildir-notify@porkbun.service