server-doc/automatic-updates.md

52 lines
884 B
Markdown
Raw Permalink Normal View History

2024-12-21 16:26:31 +01:00
# fedora automatic security updates
```
sudo dnf install dnf-automatic
```
in /etc/dnf/automatic.conf
```
[commands]
upgrade_type = security
download_updates = yes
apply_updates = yes
reboot = never
```
```
sudo systemctl enable --now dnf-automatic.timer
```
<br>
## change auto-update schedule
in /usr/lib/systemd/system/dnf-automatic-install.timer
```
[Unit]
Description=dnf-automatic-install timer
# See comment in dnf-makecache.service
ConditionPathExists=!/run/ostree-booted
Wants=network-online.target
[Timer]
######################## LINE BELOW IS SCHEDULE
OnCalendar=*-*-* 1:30 # everyday at 1:30 am
########################
RandomizedDelaySec=60m # randomized between 1:30 and 2:30
Persistent=true
[Install]
WantedBy=timers.target
```
check timers
```
systemctl list-timers # all timers
systemctl cat dnf-automatic-install.timer # only auto-update timer
```