Update WEHAGO comparison data and tools
This commit is contained in:
+11
-2
@@ -5,6 +5,7 @@ cd "$(dirname "$0")/.."
|
||||
|
||||
PORT="${1:-${INTRANET_PORT:-8010}}"
|
||||
HEALTH_URL="http://127.0.0.1:${PORT}/health"
|
||||
COMPARE_HEALTH_URL="http://127.0.0.1:${PORT}/health/wehago-compare"
|
||||
|
||||
if [ ! -x ".venv/bin/python" ]; then
|
||||
echo "가상환경이 없습니다. 먼저 아래를 실행하세요."
|
||||
@@ -15,8 +16,16 @@ if [ ! -x ".venv/bin/python" ]; then
|
||||
fi
|
||||
|
||||
if curl -fsS --max-time 2 "$HEALTH_URL" >/dev/null 2>&1; then
|
||||
echo "이미 실행 중입니다: $HEALTH_URL"
|
||||
exit 0
|
||||
if curl -fsS --max-time 4 "$COMPARE_HEALTH_URL" >/dev/null 2>&1; then
|
||||
echo "이미 실행 중입니다: $HEALTH_URL"
|
||||
exit 0
|
||||
fi
|
||||
echo "서버 포트는 열려 있지만 전표비교 readiness 가 실패했습니다. 재시작합니다."
|
||||
EXISTING_PID="$(ss -ltnp "( sport = :${PORT} )" | awk 'NR>1 {print $NF}' | sed -n 's/.*pid=\([0-9][0-9]*\).*/\1/p' | head -n 1)"
|
||||
if [ -n "${EXISTING_PID}" ]; then
|
||||
kill "${EXISTING_PID}" >/dev/null 2>&1 || true
|
||||
sleep 2
|
||||
fi
|
||||
fi
|
||||
|
||||
if ss -ltn "( sport = :${PORT} )" | tail -n +2 | grep -q .; then
|
||||
|
||||
Reference in New Issue
Block a user