diff options
author | Toby Vincent <tobyv@tobyvin.dev> | 2024-02-08 13:25:34 -0600 |
---|---|---|
committer | Toby Vincent <tobyv@tobyvin.dev> | 2024-02-08 13:25:34 -0600 |
commit | 186793251ca0ca0f1e037d4297bae4fe1a76fbf8 (patch) | |
tree | ff8f3d5ebce0ad66a6be3e37ef9885867dd49f50 /goimapnotify | |
parent | 41de982dde32a105d586803fb23c89e1fb9cf41a (diff) |
build: add and improve install scripts
Diffstat (limited to 'goimapnotify')
-rwxr-xr-x | goimapnotify/install.sh | 11 |
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 |