#!/usr/bin/env sh
set -eu

ROOT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
ENV_FILE="${FEDEO_VPS_ASTERISK_ENV_FILE:-$ROOT_DIR/telephony/vps-asterisk.env}"

if [ ! -f "$ENV_FILE" ]; then
  echo "Env-Datei nicht gefunden: $ENV_FILE" >&2
  exit 1
fi

set -a
. "$ENV_FILE"
set +a

cd "$ROOT_DIR/backend"
exec npm run dev
