mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-21 00:13:06 +01:00
Merge pull request #1346 from Security-Onion-Solutions/rc3upgrade
Rc3upgrade
This commit is contained in:
@@ -38,7 +38,8 @@ manager_check() {
|
||||
|
||||
clean_dockers() {
|
||||
# Place Holder for cleaning up old docker images
|
||||
echo ""
|
||||
echo "Trying to clean up old dockers."
|
||||
docker system prune -a -f
|
||||
}
|
||||
|
||||
clone_to_tmp() {
|
||||
@@ -185,6 +186,18 @@ rc2_to_rc3() {
|
||||
|
||||
}
|
||||
|
||||
space_check() {
|
||||
# Check to see if there is enough space
|
||||
CURRENTSPACE=$(df -BG / | grep -v Avail | awk '{print $4}' | sed 's/.$//')
|
||||
if [ "$CURRENTSPACE" -lt "10" ]; then
|
||||
echo "You are low on disk space. Upgrade will try and clean up space.";
|
||||
clean_dockers
|
||||
else
|
||||
echo "Plenty of space for upgrading"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
update_dockers() {
|
||||
# List all the containers
|
||||
if [ $MANAGERCHECK == 'so-import' ]; then
|
||||
@@ -366,7 +379,7 @@ echo ""
|
||||
|
||||
echo "Let's see if we need to update Security Onion."
|
||||
upgrade_check
|
||||
|
||||
space_check
|
||||
|
||||
echo ""
|
||||
echo "Performing upgrade from Security Onion $INSTALLEDVERSION to Security Onion $NEWVERSION."
|
||||
@@ -385,8 +398,6 @@ echo "Making pillar changes."
|
||||
pillar_changes
|
||||
echo ""
|
||||
|
||||
echo "Cleaning up old dockers."
|
||||
clean_dockers
|
||||
echo ""
|
||||
echo "Updating dockers to $NEWVERSION."
|
||||
update_dockers
|
||||
|
||||
Reference in New Issue
Block a user