Auto-update Fedora on Shutdown

With the Dirty Cow exploit out in the wild, it is important to make sure that your Linux machines are kept up to date.

The following commands will ensure your machine updates itself each time you shut it down

su
cat > /usr/lib/systemd/system-shutdown/upgrade <<EOL && chmod +x /usr/lib/systemd/system-shutdown/upgrade
#!/bin/sh
/usr/bin/dnf upgrade -y
EOL

Tags: securitydnffedora