#!/bin/sh
set -eu

INTERVAL_SECONDS="${INTERVAL_SECONDS:-2592000}"
echo "[start] updater interval=${INTERVAL_SECONDS}s out_dir=${OUT_DIR:-/data}"

while true; do
  echo "[run] update now"
  python /app/update.py
  echo "[sleep] ${INTERVAL_SECONDS}s"
  sleep "${INTERVAL_SECONDS}"
done

