feat: add dedicated douyin workbench entry
This commit is contained in:
20
scripts/status_douyin_workbench.sh
Executable file
20
scripts/status_douyin_workbench.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
PORT="${DOUYIN_WORKBENCH_PORT:-3618}"
|
||||
|
||||
if ! lsof -nP -iTCP:"$PORT" -sTCP:LISTEN >/dev/null 2>&1; then
|
||||
echo "douyin workbench stopped"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 - <<'PY'
|
||||
import os
|
||||
import urllib.request
|
||||
|
||||
port = os.environ.get("PORT", "3618")
|
||||
for path in ("/workbench", "/"):
|
||||
url = f"http://127.0.0.1:{port}{path}"
|
||||
with urllib.request.urlopen(url, timeout=5) as resp:
|
||||
print(f"{path}: {resp.status}")
|
||||
PY
|
||||
Reference in New Issue
Block a user