whaleprep/run_server.sh
dev 5c4b8ab7f2 Rename zenith-pyq-clone to whaleprep
Package, binary, tracing filter, footer copy, run_server.sh and README
updated. Footer no longer attributes zenithprepare.com.
2026-10-12 08:17:40 +05:30

13 lines
No EOL
516 B
Bash
Executable file

#!/bin/bash
# Starts the clone detached so it survives shell teardown. Usage: run_server.sh <port> <db>
set -e
DIR="/home/oiupoyt/my stuff yea/projects/whaleprep"
PORT="${1:-8123}"
DB="${2:-/tmp/pyq_run.db}"
cd "$DIR"
rm -f "$DB" "$DB-wal" "$DB-shm"
PYQ_DB="$DB" PYQ_ADDR="127.0.0.1:$PORT" RUST_LOG=info \
setsid nohup ./target/debug/whaleprep > "/tmp/pyq_server_$PORT.log" 2>&1 < /dev/null &
echo "started pid=$! port=$PORT db=$DB"
sleep 3
curl -s -o /dev/null -w "health=%{http_code}\n" "http://127.0.0.1:$PORT/"