whaleprep/deploy/termux-status.sh
dev c4080976bc Deploy artifacts: Termux service scripts plus tunnel config
deploy/termux-{start,stop,status}.sh manage the release binary on the
tablet; deploy/cloudflared-whaleprep.yml is the dedicated tunnel config
for whaleprep.oiupoyt.space. README gains a deploy section.
2026-10-12 22:26:33 +05:30

10 lines
459 B
Bash
Executable file

#!/usr/bin/env bash
# WhalePrep status + health ping. Usage: ./deploy/termux-status.sh
cd "$(dirname "$0")/.."
if [ -f ./whaleprep.pid ] && kill -0 "$(cat ./whaleprep.pid)" 2>/dev/null; then
PID=$(cat ./whaleprep.pid)
echo "RUNNING (PID $PID, RSS $(( $(ps -o rss= -p $PID 2>/dev/null || echo 0) / 1024 )) MB)"
curl -s -o /dev/null -w "health=%{http_code}\n" http://127.0.0.1:8222/ 2>&1 || echo "port not responding"
else
echo "NOT running"
fi