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>
24 lines
842 B
Bash
Executable File
24 lines
842 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Add this line to your crontab to run log rotation daily at 2 AM:
|
|
# 0 2 * * * /home/administrator/projects/mev-beta/scripts/rotate-logs.sh
|
|
|
|
# This script is meant to be run as a cron job for automatic log rotation
|
|
echo "Setting up daily log rotation for MEV Bot..."
|
|
|
|
# Get the current crontab
|
|
crontab -l > /tmp/mev_cron
|
|
|
|
# Check if our job is already in the crontab
|
|
if ! grep -q "rotate-logs.sh" /tmp/mev_cron; then
|
|
# Add the log rotation job to run daily at 2 AM
|
|
echo "0 2 * * * cd /home/administrator/projects/mev-beta && /home/administrator/projects/mev-beta/scripts/rotate-logs.sh" >> /tmp/mev_cron
|
|
# Install the new crontab
|
|
crontab /tmp/mev_cron
|
|
echo "Log rotation job added to crontab. Will run daily at 2 AM."
|
|
else
|
|
echo "Log rotation job already exists in crontab."
|
|
fi
|
|
|
|
# Clean up
|
|
rm /tmp/mev_cron |