From 617564a67837dcab27aca175581d633ccfa6331f Mon Sep 17 00:00:00 2001 From: LobbyLobster Date: Mon, 8 Apr 2024 11:32:54 +0300 Subject: [PATCH] added installer check to zimbra-health --- monomail/monomail-zimbra-health.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/monomail/monomail-zimbra-health.sh b/monomail/monomail-zimbra-health.sh index ec9db36..cdff54b 100755 --- a/monomail/monomail-zimbra-health.sh +++ b/monomail/monomail-zimbra-health.sh @@ -339,10 +339,20 @@ function queued_messages() { fi } +function check_install() { + mapfile -t ps_out < <(ps aux | grep install.sh) + if [ ${#ps_out[@]} -gt 1 ]; then + echo install.sh is working + echo Exiting... + exit 1 + fi +} + function main() { printf '\n' echo "Monomail Zimbra Health $VERSION - $(date)" printf '\n' + check_install check_ip_access printf '\n' check_zimbra_services