diff options
author | Toby Vincent <tobyv@tobyvin.dev> | 2023-10-12 15:21:22 -0500 |
---|---|---|
committer | Toby Vincent <tobyv@tobyvin.dev> | 2023-10-12 15:21:22 -0500 |
commit | 38b8fd29a6ce554f666db5a47517d1a5308136ca (patch) | |
tree | d3e68192ffffa7af421dddcb8cac2661c860390b /mbsync/install.sh | |
parent | 40468910b8a726b4b3329ce19a1863037357a02d (diff) |
feat(mail): improved services and install scripts
Diffstat (limited to 'mbsync/install.sh')
-rwxr-xr-x | mbsync/install.sh | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/mbsync/install.sh b/mbsync/install.sh index 7433fea..de06c1a 100755 --- a/mbsync/install.sh +++ b/mbsync/install.sh @@ -1,20 +1,13 @@ #!/bin/sh -printf "%s: Installing services\n" "$0" - -if command -v mbsync >/dev/null; then - systemctl --user enable --now --no-block mbsync.service - systemctl --user enable --now --no-block maildir-notify@gmail.service - systemctl --user enable --now --no-block maildir-notify@porkbun.service -else - printf "%s: command not found: mbsync\n" "$0" - exit 1 +if ! command -v "mbsync" >/dev/null; then + printf "%s: mbsync not found, skipping...\n" "$0" + exit 0 fi -if command -v goimapnotify >/dev/null; then - systemctl --user enable --now --no-block goimapnotify@gmail.service - systemctl --user enable --now --no-block goimapnotify@porkbun.service -else - printf "%s: command not found: goimapnotify\n" "$0" - exit 1 -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 |