From b53c64ae3c8f240d82ae16ae81d1e35e91d38ea0 Mon Sep 17 00:00:00 2001 From: Jefferson Carneiro - Slackjeff Date: Thu, 20 Mar 2025 14:09:18 -0300 Subject: [PATCH] fix: Installation don't stop, error but the service is failing. Service normally starts, but after a few seconds it fails. The installer did not cause an error --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 7d34264cbe7..6a1f5ab183b 100755 --- a/install.sh +++ b/install.sh @@ -135,6 +135,9 @@ standalone_install() { $SUDO cp $TMP_DIR/shellhub-agent.service /etc/systemd/system/shellhub-agent.service $SUDO systemctl enable --now shellhub-agent || { rm -rf $TMP_DIR && echo "❌ Failed to enable systemd service."; exit 1; } + # Wait, as the service normally activates and after a few seconds it fails. + sleep 5s + $SUDO systemctl is-active --quiet shellhub-agent || { rm -rf $TMP_DIR && echo "❌ Failed to enable systemd service."; exit 1; } $SUDO rm -rf $INSTALL_DIR $SUDO mv $TMP_DIR $INSTALL_DIR