Setting up Auto update fedora
Setting up Auto update
sudo dnf install dnf-automatic
sudo cp /usr/share/dnf5/dnf5-plugins/automatic.conf /etc/dnf/automatic.conf
sudo nano /etc/dnf/automatic.conf
______________________________________________________________________________________
apply_updates = yes
download_updates = yes
network_online_timeout = 60
random_sleep = 0
upgrade_type = default
reboot = never (when-changed, when-neede)
[emitters]
emit_via = email (command, command_email - can set meny seperated by coma)
emit_no_updates = yes
_______________________________________________________________________________________
If Set Command_email
email_from = root@localhost
email_to = rasitha@localhost
sudo dnf install sendmail s-nail
sudo systemctl enable sendmail
sudo systemcts start sendmail
to view email
cat /var/mail/user
If set email
email_from = rasitha@zohomail.com
email_to = rashitha@gmx.com
email_host = smtp
email_port = 465
email_tls = yes
# Credentials to use for SMTP server authentication are taken from .netrc file
Put .netrc file in roots homepage
sudo su -
nano .netrc
machine smtp host name
login login name
password password
_______________________________________________________________________________________
sudo systemctl edit dnf5-automatic.timer
[Timer]
# Empty string disables the default 6-7 AM update
OnCalendar=
OnCalendar=*-*-* 1:05 (every day at 1.05am)
RandomizedDelaySec=0
Persistent=true
sudo systemctl enable --now dnf5-automatic.timer
Comments
Post a Comment