]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
liveboot: delete kernel debug archive when garbage collection ran
authorFabian Holler <fabian.holler@profitbricks.com>
Thu, 22 Aug 2013 14:37:37 +0000 (16:37 +0200)
committerHolger Levsen <holger@layer-acht.org>
Thu, 22 Aug 2013 16:16:18 +0000 (18:16 +0200)
delete the liveboot kernel debug archive in /srv/liveboot/debug_archives
when the associated liveboot image is deleted

liveboot_garbage_collection.sh

index 7f1b934663d700aabfe002ea580e92f53a8493c4..ef245b2e9988fa463d67dfc769aaaa0b34df9def 100755 (executable)
@@ -11,6 +11,7 @@ set -e
 AMOUNT_TO_KEEP=15
 WARNING_TRESHOLD=10
 LIVEBOOT_IMAGE_PATH="/srv/mirror/liveboot"
+DEBUG_ARCHIVE_PATH="/srv/liveboot/debug_archives"
 
 
 echo
@@ -48,6 +49,7 @@ for DIRECTORY in $SECOND_PASS ; do
                $SCRIPT_PATH/cleanup_liveboot.py "delete" "$DIRECTORY" 
                # FIXME: this sudo is kinda ugly. cause is liveboot_build.sh actually
                sudo rm -rf "$LIVEBOOT_IMAGE_PATH/$DIRECTORY"
+               sudo rm -f $DEBUG_ARCHIVE_PATH/$DIRECTORY*
        fi
 done
 echo