#!/bin/sh
set -eu

DATA_DIR="${LUMINARY_DATA:-/data}"
ADDR="${LUMINARY_ADDR:-:8293}"

mkdir -p "$DATA_DIR"

echo "[luminary] $(date '+%Y-%m-%d %H:%M:%S') starting (addr=${ADDR}, data=${DATA_DIR})"
exec /usr/local/bin/luminary -data-dir "$DATA_DIR" -addr "$ADDR"
