mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-04 02:15:24 +01:00
Created Auto-updating mirrors (markdown)
parent
a055a77b8a
commit
bd0eeff7c4
1 changed files with 33 additions and 0 deletions
33
Auto‐updating-mirrors.md
Normal file
33
Auto‐updating-mirrors.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
You can keep mirror up to date using the systemd timer
|
||||
### /etc/systemd/user/lbmirror.service
|
||||
```ini
|
||||
[Unit]
|
||||
Description=live-bootstrap mirror
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
WorkingDirectory=/var/lib/lbmirror/live-bootstrap/
|
||||
ExecStartPre=/usr/bin/git pull
|
||||
ExecStart=/var/lib/lbmirror/live-bootstrap/mirror.sh /var/lib/lbmirror/mirror
|
||||
```
|
||||
Create a user `lbmirror`.
|
||||
|
||||
### /etc/systemd/user/lbmirror.timer
|
||||
```ini
|
||||
[Unit]
|
||||
Description=Sync live-bootstrap every 30 minutes
|
||||
|
||||
[Timer]
|
||||
OnBootSec=3min
|
||||
OnUnitActiveSec=30min
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
```
|
||||
Enable periodic updates using:
|
||||
```
|
||||
loginctl enable-linger lbmirror
|
||||
systemctl --user enable lbmirror.timer
|
||||
systemctl --user start lbmirror.timer
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue