41 lines
1.2 KiB
Markdown
41 lines
1.2 KiB
Markdown
# AREDN Firmware Sync Script
|
|
|
|
This script mirrors the [AREDN firmware repository](https://downloads.arednmesh.org/), patches the firmware site config to use a local mesh URL, and regenerates JSON indexes. See [Creating a Local AREDN® Software Server](https://docs.arednmesh.org/en/latest/arednHow-toGuides/local-software-source.html).
|
|
This script was designed for use **Disaster Response Communications & Information Technology (DRCIT)** but is freely reusable by other hams/groups.
|
|
|
|
---
|
|
|
|
## 🚀 Quick Start (5 minutes)
|
|
|
|
```bash
|
|
# 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 |