Update README.md
This commit is contained in:
parent
f9b1abd9f4
commit
84f753fdc6
|
@ -16,7 +16,7 @@ cd aredn
|
||||||
nano aredn_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 aredn_sync.sh
|
install -m 755 aredn_sync.sh ~/.local/bin/
|
||||||
|
|
||||||
# 4. Test once manually (Below assumes you placed it in the ~/.local/bin folder).
|
# 4. Test once manually (Below assumes you placed it in the ~/.local/bin folder).
|
||||||
~/.local/bin/aredn_sync.sh
|
~/.local/bin/aredn_sync.sh
|
||||||
|
@ -24,7 +24,7 @@ chmod +x 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)
|
||||||
crontab -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/aredn_sync.sh >> ~/.local/logs/aredn.log 2>&1
|
||||||
|
|
||||||
# 6. Add logrotate rule
|
# 6. Add logrotate rule
|
||||||
sudo tee /etc/logrotate.d/aredn-sync <<'EOF'
|
sudo tee /etc/logrotate.d/aredn-sync <<'EOF'
|
||||||
|
@ -54,7 +54,7 @@ Done ✅ — your mirror will now stay up to date automatically. Replace <user>
|
||||||
---
|
---
|
||||||
|
|
||||||
## ⚙️ Variables to Edit
|
## ⚙️ Variables to Edit
|
||||||
At the top of `sync.sh`, adjust these for your environment:
|
At the top of `aredn_sync.sh`, adjust these for your environment:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ROOT="$HOME/<path to root folder>/aredn" # mirror root
|
ROOT="$HOME/<path to root folder>/aredn" # mirror root
|
||||||
|
@ -72,7 +72,7 @@ Replace any <paths> with the correct path (e.g. "$HOME/**docker/fileserver/files
|
||||||
To keep your mirror current, run the script daily:
|
To keep your mirror current, run the script daily:
|
||||||
|
|
||||||
```cron
|
```cron
|
||||||
0 0 * * * ~/aredn/sync.sh >> ~/.local/logs/aredn.log 2>&1
|
0 0 * * * ~/.local/bin/aredn_sync.sh >> ~/.local/logs/aredn.log 2>&1
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
Loading…
Reference in a new issue