#!/bin/bash
set -eu

ROOT_DIR="${ROOT_DIR:-/volume1/projects/data_feed}"

re_register() {
  bash "${ROOT_DIR}/tools/re_register_act_runner_synology.sh"
}

start_runner() {
  bash "${ROOT_DIR}/tools/start_act_runner_synology.sh"
}

case "${1:-all}" in
  re-register)
    re_register
    ;;
  start)
    start_runner
    ;;
  all)
    re_register
    start_runner
    ;;
  *)
    echo "usage: $0 {all|re-register|start}"
    exit 2
    ;;
esac
