#!/bin/bash # bootstrap-account.sh — run AS the target account on its host AFTER # root-create-accounts.sh. Idempotent. Everything lands in ~/mopac. # Env: MOPAC_STAGE (dir containing fleet-stage.tgz) — default: copied in. set -eu MOPAC="$HOME/mopac" mkdir -p "$MOPAC" cd "$MOPAC" if [ ! -d harness ]; then tar xzf fleet-stage.tgz # harness repo incl. bin/harness-linux-amd64 fi cd harness # Per-account identity + secrets. ONLY Bitwarden access material belongs on # disk long-term (SPEC); tonight's boot uses env refs staged 0600 — migrate # to keyproxy (497) when Charles wires BW tomorrow. if [ ! -f "$MOPAC/env" ]; then cat > "$MOPAC/env" <