Usage:
chmod +x pull-logs.sh
./pull-logs.shNotes:
- Ensure .env.local exists in the project root with REMOTE_USER, REMOTE_HOST and REMOTE_PATH set.
- Copy .env.example and replace with actual values
- .env.local and data/ are ignored by git per .gitignore.
Use the latest pulled log directory to generate an HTML report with charts.
On NixOS, enter a shell with the required tools first:
nix shell nixpkgs#goaccesslatest="$(find data -mindepth 1 -maxdepth 1 -type d | sort | tail -n 1)"
site_dir="$(find "$latest" -mindepth 1 -maxdepth 1 -type d | sort | head -n 1)"
{
find "$site_dir" -maxdepth 1 -type f -name 'transfer*.log' -exec zcat -f {} +
find "$site_dir" -maxdepth 1 -type f -name 'transfer.log-*.zip' -exec zcat -f {} +
} | goaccess --log-format COMBINED -j 4 --agent-list -o report.html -TODO: make a script for automating the above command.