Find a file
2025-08-25 11:21:47 -07:00
LICENSE Initial commit 2025-08-25 10:44:16 -07:00
README.md Update README.md 2025-08-25 11:21:47 -07:00
sync.sh Update sync.sh 2025-08-25 10:48:10 -07:00

AREDN Firmware Sync Script

This script mirrors the AREDN firmware repository, patches the firmware site config to use a local mesh URL, and regenerates JSON indexes. See Creating a Local AREDN® Software Server. This script was designed for use Disaster Response Communications & Information Technology (DRCIT) but is freely reusable by other hams/groups.


🚀 Quick Start (5 minutes)

# 1. Clone this repo
git clone https://drcit.dev/DRCIT/aredn.git
cd aredn

# 2. Edit sync.sh variables for your node
nano sync.sh   # set ROOT, LOG, NEW_URL

# 3. Make it executable
chmod +x ~/.local/bin/sync.sh

# 4. Test once manually
~/.local/bin/sync.sh

# 5. Add cron (every 4 hours, as local user part of the docker group)
sudo crontab -u <user> -e 
# add this line:
0 */4 * * * ~/.local/bin/sync.sh >> ~/.local/logs/aredn.log 2>&1

# 6. Add logrotate rule
sudo tee /etc/logrotate.d/aredn-sync <<'EOF'
su drcit drcit
/home/drcit/.local/logs/aredn.log {
    daily
    rotate 7
    compress
    delaycompress
    missingok
    notifempty
    create 0640 drcit drcit
}
EOF