From 7c9a45edf5227692a458bc0fc7a4e16ba2966ed8 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 5 May 2025 19:27:17 +1200 Subject: [PATCH] . --- templates/squashkiwi/nuke.sh | 11 +++++++++++ templates/squashkiwi/uninstall.sh | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 templates/squashkiwi/nuke.sh diff --git a/templates/squashkiwi/nuke.sh b/templates/squashkiwi/nuke.sh new file mode 100644 index 0000000..f70d2fa --- /dev/null +++ b/templates/squashkiwi/nuke.sh @@ -0,0 +1,11 @@ +#!/bin/bash +source "${AGENT_PATH}/_common.sh" +_check_required_env_vars "LOCAL_DATA_FOLDER" + +# remove the local data folder +if [ -d "${LOCAL_DATA_FOLDER}" ]; then + rm -rf ${LOCAL_DATA_FOLDER} +fi + +echo "Nuke of ${CONTAINER_NAME} complete" + diff --git a/templates/squashkiwi/uninstall.sh b/templates/squashkiwi/uninstall.sh index 41f87f8..f324a25 100644 --- a/templates/squashkiwi/uninstall.sh +++ b/templates/squashkiwi/uninstall.sh @@ -12,8 +12,5 @@ _remove_container $CONTAINER_NAME || _die "Failed to remove container ${CONTAINE _is_container_running && _die "Couldn't stop existing container" _is_container_exists && _die "Couldn't remove existing container" -# remove the image -docker rmi "$IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG" || echo "Failed to remove image $IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG" - echo "Uninstallation of ${CONTAINER_NAME} complete." echo "Local data folder ${LOCAL_DATA_FOLDER} still in place."