From 186793251ca0ca0f1e037d4297bae4fe1a76fbf8 Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Thu, 8 Feb 2024 13:25:34 -0600 Subject: build: add and improve install scripts --- mbsync/install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'mbsync/install.sh') 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 -- cgit v1.2.3-70-g09d2