Files
mev-beta/orig/scripts/stop-24h-test.sh
Administrator c54c569f30 refactor: move all remaining files to orig/ directory
Completed clean root directory structure:
- Root now contains only: .git, .env, docs/, orig/
- Moved all remaining files and directories to orig/:
  - Config files (.claude, .dockerignore, .drone.yml, etc.)
  - All .env variants (except active .env)
  - Git config (.gitconfig, .github, .gitignore, etc.)
  - Tool configs (.golangci.yml, .revive.toml, etc.)
  - Documentation (*.md files, @prompts)
  - Build files (Dockerfiles, Makefile, go.mod, go.sum)
  - Docker compose files
  - All source directories (scripts, tests, tools, etc.)
  - Runtime directories (logs, monitoring, reports)
  - Dependency files (node_modules, lib, cache)
  - Special files (--delete)

- Removed empty runtime directories (bin/, data/)

V2 structure is now clean:
- docs/planning/ - V2 planning documents
- orig/ - Complete V1 codebase preserved
- .env - Active environment config (not in git)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 10:53:05 +01:00

43 lines
972 B
Bash
Executable File

#!/bin/bash
# Stop 24-hour test
LOG_DIR="logs/24h_test"
PID_FILE="${LOG_DIR}/mev-bot.pid"
if [ ! -f "${PID_FILE}" ]; then
echo "❌ No test running (PID file not found)"
exit 1
fi
PID=$(cat "${PID_FILE}")
echo "🛑 Stopping MEV bot (PID ${PID})..."
if ps -p "${PID}" > /dev/null 2>&1; then
kill "${PID}"
echo " Waiting for graceful shutdown..."
# Wait up to 10 seconds
for i in {1..10}; do
if ! ps -p "${PID}" > /dev/null 2>&1; then
echo "✅ Bot stopped successfully"
rm -f "${PID_FILE}"
exit 0
fi
sleep 1
done
# Force kill if still running
echo "⚠️ Forcing shutdown..."
kill -9 "${PID}" 2>/dev/null
rm -f "${PID_FILE}"
echo "✅ Bot forcefully stopped"
else
echo "⚠️ Bot not running, cleaning up PID file"
rm -f "${PID_FILE}"
fi
# Generate final report
echo ""
echo "📊 Generating final report..."
./scripts/generate-test-report.sh