aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mbsync/install.sh
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-02-08 13:25:34 -0600
committerToby Vincent <tobyv@tobyvin.dev>2024-02-08 13:25:34 -0600
commit186793251ca0ca0f1e037d4297bae4fe1a76fbf8 (patch)
treeff8f3d5ebce0ad66a6be3e37ef9885867dd49f50 /mbsync/install.sh
parent41de982dde32a105d586803fb23c89e1fb9cf41a (diff)
build: add and improve install scripts
Diffstat (limited to 'mbsync/install.sh')
-rwxr-xr-xmbsync/install.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/mbsync/install.sh b/mbsync/install.sh
index de06c1a..957765e 100755
--- a/mbsync/install.sh
+++ b/mbsync/install.sh
@@ -1,13 +1,14 @@
#!/bin/sh
-if ! command -v "mbsync" >/dev/null; then
- printf "%s: mbsync not found, skipping...\n" "$0"
+pkgname=mbsync
+
+if ! command -v "$pkgname" >/dev/null; then
+ printf "%s: $pkgname not found, skipping...\n" "$0"
exit 0
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
+for instance in gmail porkbun; do
+ systemctl --user enable --now --no-block $pkgname@"$instance".service
+done