aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/goimapnotify/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'goimapnotify/install.sh')
-rwxr-xr-xgoimapnotify/install.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/goimapnotify/install.sh b/goimapnotify/install.sh
index 312c51b..f324554 100755
--- a/goimapnotify/install.sh
+++ b/goimapnotify/install.sh
@@ -1,11 +1,14 @@
#!/bin/sh
-if ! command -v "goimapnotify" >/dev/null; then
- printf "%s: goimapnotify not found, skipping...\n" "$0"
+pkgname=goimapnotify
+
+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 goimapnotify@gmail.service
-systemctl --user enable --now --no-block goimapnotify@porkbun.service
+for instance in gmail porkbun; do
+ systemctl --user enable --now --no-block $pkgname@"$instance".service
+done