#!/usr/bin/env bash
# Absolute Raid Bot - how it's doing: service, recent log, backups, memory and disk.
APP=/opt/absolute-raid-bot
systemctl --no-pager --lines=0 status absolute-raid-bot
echo; echo "== pairing"
if [ -s "$APP/data/pairing-code.txt" ]; then echo "NOT PAIRED. Pairing code: $(cat "$APP/data/pairing-code.txt")   (Discord: /dkpadmin pair)"
else echo "Paired with a Discord server (sudo arb-pair-reset to unpair)."; fi
echo; echo "== last log lines"; journalctl -u absolute-raid-bot -n 15 --no-pager
echo; echo "== backups"; ls -lh "$APP/data/backups" 2>/dev/null | tail -n 5 || echo "none yet (daily at 09:00 UTC)"
echo; echo "== memory and disk"; free -h | head -2; df -h / | tail -1
