Created
January 15, 2010 21:50
-
-
Save jodell/278448 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Automatically apply security updates, resets to normal repo listings, | |
# and downloads packages ahead of time for manual upgrades. | |
# This is necessary if you're running Ubuntu (always unstable), have | |
# custom repos that you might not want to auto-update from, etc. | |
# Cron'ing this script helps ward off auditors and cyber-ninjas alike. | |
# -jodell 20100115 | |
# Assumes that you've partitioned security repo lines appropriately | |
sudo apt-get -o "Dir::Etc::SourceList=/etc/apt/security.list" -o "Dir::Etc::sourceparts=''" update | |
sudo apt-get upgrade -y | |
# Reset to default sources | |
sudo apt-get update | |
# Download packages only | |
sudo apt-get -y -d dist-upgrade |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment