diff --git a/caddy/uninstall.sh b/caddy/uninstall.sh index 7f86e87..f3a04be 100755 --- a/caddy/uninstall.sh +++ b/caddy/uninstall.sh @@ -6,10 +6,9 @@ _check_required_env_vars # The uninstall script is required for all templates. # It is used to uninstall the service from the server. - -_remove_container $CONTAINER_NAME || _die "Failed to remove container ${CONTAINER_NAME}" -_is_container_running && _die "Couldn't stop existing container" -_is_container_exists && _die "Couldn't remove existing container" +_remove_container "$CONTAINER_NAME" || _die "Failed to remove container ${CONTAINER_NAME}" +_is_container_running "$CONTAINER_NAME" && _die "Couldn't stop existing container" +_is_container_exists "$CONTAINER_NAME" && _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" diff --git a/simple-object-server/uninstall.sh b/simple-object-server/uninstall.sh index 8237fec..a423eaa 100755 --- a/simple-object-server/uninstall.sh +++ b/simple-object-server/uninstall.sh @@ -8,9 +8,9 @@ _check_required_env_vars # It is called with the path to the server specific env file as an argument. -_remove_container $CONTAINER_NAME || _die "Failed to remove container ${CONTAINER_NAME}" -_is_container_running && _die "Couldn't stop existing container" -_is_container_exists && _die "Couldn't remove existing container" +_remove_container "$CONTAINER_NAME" || _die "Failed to remove container ${CONTAINER_NAME}" +_is_container_running "$CONTAINER_NAME" && _die "Couldn't stop existing container" +_is_container_exists "$CONTAINER_NAME" && _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" diff --git a/squashkiwi/uninstall.sh b/squashkiwi/uninstall.sh index 253a744..8162e62 100755 --- a/squashkiwi/uninstall.sh +++ b/squashkiwi/uninstall.sh @@ -7,10 +7,9 @@ _check_required_env_vars "CONTAINER_NAME" "LOCAL_DATA_FOLDER" # It is used to uninstall the service from the server. # It is called with the path to the server specific env file as an argument. - -_remove_container $CONTAINER_NAME || _die "Failed to remove container ${CONTAINER_NAME}" -_is_container_running && _die "Couldn't stop existing container" -_is_container_exists && _die "Couldn't remove existing container" +_remove_container "$CONTAINER_NAME" || _die "Failed to remove container ${CONTAINER_NAME}" +_is_container_running "$CONTAINER_NAME" && _die "Couldn't stop existing container" +_is_container_exists "$CONTAINER_NAME" && _die "Couldn't remove existing container" echo "Uninstallation of ${CONTAINER_NAME} complete." echo "Local data folder ${LOCAL_DATA_FOLDER} still in place."