#!/bin/sh
# vl_run_0007.sh - 정합성 실행 러너 (easy)
# 사용법: vl_run_0007.sh <YYYYMMDD>
set -eu

BIZDATE="${1:-$(date +%Y%m%d)}"
APP_HOME="${APP_HOME:-/app/acquire-core}"
BIN="${APP_HOME}/bin"
LOG="${APP_HOME}/log/vl_run_0007_${BIZDATE}.log"

echo "[vl_run_0007] 정합성 처리 시작 date=${BIZDATE}"
if [ -x "${BIN}/vl_bt_0001" ]; then
    "${BIN}/vl_bt_0001" "${BIZDATE}" "acquire@localhost" >> "${LOG}" 2>&1
    RC=$?
else
    echo "[vl_run_0007] 실행 파일 없음: ${BIN}/vl_bt_0001" >&2
    RC=0
fi
echo "[vl_run_0007] 종료 rc=${RC}"
exit ${RC}
