From 2353e0fc8df42c0614765e014bf576c5304c2c19 Mon Sep 17 00:00:00 2001 From: server Date: Tue, 14 Apr 2026 10:33:04 +0200 Subject: [PATCH] deploy: extend login healthcheck to entergame --- deploy/healthcheck/README.md | 6 ++-- deploy/healthcheck/metin-login-healthcheck.sh | 28 ++++++++++++++++++- docs/healthchecks.md | 19 +++++++++++-- 3 files changed, 48 insertions(+), 5 deletions(-) diff --git a/deploy/healthcheck/README.md b/deploy/healthcheck/README.md index e84393c..ad2ed2f 100644 --- a/deploy/healthcheck/README.md +++ b/deploy/healthcheck/README.md @@ -3,8 +3,10 @@ What it does: - creates a temporary account in MariaDB - runs `metin_login_smoke` against auth and channel ports -- verifies `AUTH_SUCCESS`, `EMPIRE`, and `LOGIN_SUCCESS4` -- deletes the temporary account on exit +- verifies `AUTH_SUCCESS`, `EMPIRE`, `LOGIN_SUCCESS4`, character select, and `ENTERGAME` +- creates a temporary character when the temporary account is empty +- deletes the temporary account and temporary character rows on exit +- passes the expected client version string to the smoke client Default paths and ports are tuned for the current VPS layout. Override with env vars if needed: - `RUN_AS_USER` diff --git a/deploy/healthcheck/metin-login-healthcheck.sh b/deploy/healthcheck/metin-login-healthcheck.sh index 10051eb..56bf7d8 100755 --- a/deploy/healthcheck/metin-login-healthcheck.sh +++ b/deploy/healthcheck/metin-login-healthcheck.sh @@ -13,6 +13,7 @@ fi : "${AUTH_PORT:=11000}" : "${CHANNEL_PORT:=11011}" : "${SMOKE_BIN:=/home/${RUN_AS_USER}/metin/build/server-src/bin/metin_login_smoke}" +: "${CLIENT_VERSION:=1215955205}" if [[ ! -x "${SMOKE_BIN}" ]]; then echo "Smoke binary not found: ${SMOKE_BIN}" >&2 @@ -28,8 +29,31 @@ LOGIN="smkhc$(date +%s)" PASSWORD="$(openssl rand -hex 6)" SOCIAL_ID="$(date +%s%N | tail -c 14)" EMAIL="${LOGIN}@example.invalid" +CHARACTER_NAME="c${LOGIN}" +ACCOUNT_ID="" cleanup() { + if [[ -n "${ACCOUNT_ID}" ]]; then + mysql player >/dev/null 2>&1 </dev/null 2>&1 < --password-env=METIN_LOGIN_SMOKE_PASSWORD ``` +If you want the smoke client to create a temporary character when the account is empty: + +```bash +sudo -iu mt2.jakubkadlec.dev env METIN_LOGIN_SMOKE_PASSWORD='' \ + /home/mt2.jakubkadlec.dev/metin/build/server-src/bin/metin_login_smoke \ + 173.249.9.66 11000 11011 --password-env=METIN_LOGIN_SMOKE_PASSWORD \ + --create-character-name=smoketestchar \ + --client-version=1215955205 +``` + ## Security Notes This does not open a new public network surface. It is a local operational tool.