diff options
Diffstat (limited to 'mbsync/install.sh')
-rwxr-xr-x | mbsync/install.sh | 13 |
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 |