#!/usr/bin/env bash
# Start RSPC and wait until it is healthy.
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
require_root
require_installed

systemctl start "$RSPC_SERVICE"
if wait_healthy 30; then
  ok "RSPC $(installed_version) is running"
else
  show_recent_logs 40
  die "RSPC did not become healthy"
fi
