Collection of operational skills for VaultMesh infrastructure including: - backup-sovereign: Backup and recovery operations - btc-anchor: Bitcoin anchoring - cloudflare-tunnel-manager: Cloudflare tunnel management - container-registry: Container registry operations - disaster-recovery: Disaster recovery procedures - dns-sovereign: DNS management - eth-anchor: Ethereum anchoring - gitea-bootstrap: Gitea setup and configuration - hetzner-bootstrap: Hetzner server provisioning - merkle-forest: Merkle tree operations - node-hardening: Node security hardening - operator-bootstrap: Operator initialization - proof-verifier: Cryptographic proof verification - rfc3161-anchor: RFC3161 timestamping - secrets-vault: Secrets management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
43 lines
1.1 KiB
Bash
43 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
SKILL_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
source "$SCRIPT_DIR/_common.sh"
|
|
|
|
: "${BACKUP_SKILL_DIR:=}"
|
|
: "${RUN_DIR:=}"
|
|
: "${DR_TARGET_BASE:=$HOME/recovery-drills}"
|
|
: "${AGE_IDENTITY_FILE:=}"
|
|
|
|
main() {
|
|
log_info "Starting 00_preflight.sh"
|
|
[[ -n "$BACKUP_SKILL_DIR" ]] || die "BACKUP_SKILL_DIR is required."
|
|
[[ -d "$BACKUP_SKILL_DIR" ]] || die "BACKUP_SKILL_DIR not found: $BACKUP_SKILL_DIR"
|
|
|
|
[[ -n "$AGE_IDENTITY_FILE" ]] || die "AGE_IDENTITY_FILE is required."
|
|
[[ -f "$AGE_IDENTITY_FILE" ]] || die "AGE_IDENTITY_FILE not found: $AGE_IDENTITY_FILE"
|
|
|
|
need tar
|
|
need gzip
|
|
need age
|
|
need find
|
|
need stat
|
|
|
|
if command -v b3sum >/dev/null 2>&1 || command -v blake3 >/dev/null 2>&1; then
|
|
:
|
|
else
|
|
die "Need BLAKE3 tool: b3sum (preferred) or blake3."
|
|
fi
|
|
|
|
mkdir -p "$SKILL_ROOT/outputs"
|
|
mkdir -p "$DR_TARGET_BASE"
|
|
|
|
local resolved
|
|
resolved="$(resolve_run_dir "$BACKUP_SKILL_DIR" "$RUN_DIR")"
|
|
[[ -d "$resolved" ]] || die "Resolved RUN_DIR not found: $resolved"
|
|
log_info "Using RUN_DIR: $resolved"
|
|
log_info "Preflight OK."
|
|
}
|
|
|
|
main "$@"
|