#!/bin/sh # Resilient launcher for fmcd. # # fmcd requires >=1 federation to boot — if the default federation is # unreachable at first boot it exits non-zero. Rather than let the container # crash-loop (and on a node, spam restarts), retry here with a backoff so the # join happens in the background once the federation becomes reachable. Once # fmcd is up it runs forever; this loop only re-runs it on exit. # # All config comes from FMCD_* env (FMCD_ADDR, FMCD_MODE, FMCD_DATA_DIR, # FMCD_INVITE_CODE, FMCD_PASSWORD), so fmcd needs no CLI args here. set -u while true; do fmcd || true echo "[fmcd-run] fmcd exited (federation unreachable?); retrying in 30s" >&2 sleep 30 done