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