#!/usr/bin/env bash
set -euo pipefail

SERVER_URL="${SERVER_URL:-http://139.144.99.218:4012}"

cat <<EOF
BetterGrow setup is now split into reboot-safe numbered steps.

Run these one at a time on the device:

  curl -fsSL $SERVER_URL/00-boot-software.sh | sudo bash
  sudo reboot

  curl -fsSL $SERVER_URL/01-4g.sh | sudo bash
  sudo reboot

  curl -fsSL $SERVER_URL/02-gps.sh | sudo bash
  sudo reboot

  curl -fsSL $SERVER_URL/03-provision.sh | sudo bash -s -- --device-name "rig-04"

  netbird up --management-url https://netbird.admodum.com.au

Each step is idempotent and can be rerun before moving to the next step.
EOF
