diff --git a/static-website/install.sh b/static-website/install.sh index 571c384..968e9b9 100755 --- a/static-website/install.sh +++ b/static-website/install.sh @@ -19,10 +19,10 @@ echo "Pulling image ${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}..." docker pull "$IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG" || _die "Failed to pull image $IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG" echo "Stopping and removing any existing container..." -bash ./stop.sh || _die "Failed to stop container ${CONTAINER_NAME}" +./stop.sh || _die "Failed to stop container ${CONTAINER_NAME}" _remove_container $CONTAINER_NAME || _die "Failed to remove container ${CONTAINER_NAME}" echo "Starting container..." -bash ./start.sh || _die "Failed to start container ${CONTAINER_NAME}" +./start.sh || _die "Failed to start container ${CONTAINER_NAME}" echo "Installation complete for service ${CONTAINER_NAME}." diff --git a/static-website/nuke.sh b/static-website/nuke.sh index 8160ff9..7fb2b8a 100755 --- a/static-website/nuke.sh +++ b/static-website/nuke.sh @@ -10,4 +10,9 @@ _check_required_env_vars "LOCAL_DATA_FOLDER" "CONTAINER_NAME" datanuke "path=${LOCAL_DATA_FOLDER}" || _die "Failed to nuke ${LOCAL_DATA_FOLDER}" +if [ -d "${LOCAL_DATA_FOLDER}" ]; then + echo "datanuke failed to remove ${LOCAL_DATA_FOLDER}" + exit 1 +fi + echo "Nuke complete for service ${CONTAINER_NAME}." diff --git a/test_template.sh b/test_template.sh index 5063aa1..29bc93f 100755 --- a/test_template.sh +++ b/test_template.sh @@ -56,7 +56,7 @@ title "Checking template $TEMPLATE" SERVICE_NAME="test-$TEMPLATE" title "Nuking old service" -ds nuke localhost $SERVICE_NAME || die "Failed to fullnuke old service" +ds nuke localhost $SERVICE_NAME || die "Failed to nuke old service" title "Creating service" ds create-service localhost $SERVICE_NAME $TEMPLATE || die "Failed to create service"