Update README.md

This commit is contained in:
mudhorn 2025-08-25 12:00:35 -07:00
parent 9061928e47
commit de00cc09a9

View file

@ -1,7 +1,7 @@
# AREDN Firmware Sync Script # 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 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. This script was designed for use by **Disaster Response Communications & Information Technology (DRCIT)** but is freely reusable by other hams/groups.
--- ---
@ -12,17 +12,17 @@ This script was designed for use **Disaster Response Communications & Informatio
git clone https://drcit.dev/DRCIT/aredn.git git clone https://drcit.dev/DRCIT/aredn.git
cd aredn cd aredn
# 2. Edit sync.sh variables for your node # 2. Edit aredn_sync.sh variables for your node
nano sync.sh # set ROOT, LOG, NEW_URL nano aredn_sync.sh # set ROOT, LOG, NEW_URL
# 3. Make it executable # 3. Make it executable
chmod +x ~/.local/bin/sync.sh chmod +x aredn_sync.sh
# 4. Test once manually # 4. Test once manually (Below assumes you placed it in the ~/.local/bin folder).
~/.local/bin/sync.sh ~/.local/bin/aredn_sync.sh
# 5. Add cron (every 4 hours, as local user part of the docker group) # 5. Add cron (every 4 hours, as local user part of the docker group)
sudo crontab -u <user> -e crontab -e
# add this line: # add this line:
0 */4 * * * ~/.local/bin/sync.sh >> ~/.local/logs/aredn.log 2>&1 0 */4 * * * ~/.local/bin/sync.sh >> ~/.local/logs/aredn.log 2>&1
@ -41,7 +41,7 @@ su <user> <group>
EOF EOF
``` ```
Done ✅ — your mirror will now stay up to date automatically. Replace <user> <group> with actual user & group (usually drcit drcit) and any <paths> with the correct *absolute* path (e.g. "/**home/drcit**/.local/logs/aredn.log {") Done ✅ — your mirror will now stay up to date automatically. Replace <user> and <group> with actual user & group (usually drcit drcit), and replace any <paths> with the correct *absolute* path (e.g. /**home/drcit**/.local/logs/aredn.log)
--- ---
@ -82,7 +82,7 @@ To prevent logs from growing indefinitely, add `/etc/logrotate.d/aredn-sync`:
```conf ```conf
su <user> <group> su <user> <group>
/home/drcit/.local/logs/aredn.log { /<home path>/.local/logs/aredn.log {
daily daily
rotate 7 rotate 7
compress compress
@ -93,7 +93,7 @@ su <user> <group>
} }
``` ```
This rotates logs daily, keeps 7 days, and compresses older logs. Replace <user> <group> with the actual user & group (usually drcit drcit). This rotates logs daily, keeps 7 days, and compresses older logs. Replace <user> and <group> with actual user & group (usually drcit drcit), and replace any <paths> with the correct *absolute* path (e.g. /**home/drcit**/.local/logs/aredn.log)
--- ---