-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from bryanlatten/feature-convenience-scripts
Scripts: added clean and security_updates conveniences
- Loading branch information
Showing
4 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash -e | ||
|
||
#------------------------------------------------------------------- | ||
# Performs cleanup, ensure unnecessary packages and package lists | ||
# are safely removed, without triggering Docker AUFS permission bug | ||
#------------------------------------------------------------------- | ||
|
||
apt-get autoclean -y && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /var/lib/{cache,log}/ && \ | ||
rm -rf /var/lib/apt/lists/*.lz4 && \ | ||
rm -rf /tmp/* /var/tmp/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
#------------------------------------------------------------------- | ||
# Upgrade just the packages listed as security, without affecting | ||
# any subsequent usages of apt-get | ||
#------------------------------------------------------------------- | ||
|
||
apt-get update && \ | ||
grep security /etc/apt/sources.list > /tmp/security.list && \ | ||
apt-get upgrade -oDir::Etc::Sourcelist=/tmp/security.list -yq && \ | ||
rm /tmp/security.list |