Skip to content

Commit

Permalink
If container exists but EULA not signed, reinstall
Browse files Browse the repository at this point in the history
re-install vertica-demo if the container exists but the conf file
doesn't indicate an EULA signature.  Before this fix, if someone erases
their etc/vertica-demo.conf file because they wanted to start from
scratch, it wouldn't clear out the old vertica-demo container.
  • Loading branch information
NerdLogic committed Oct 14, 2022
1 parent 0e4a513 commit 172454f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ vertica-stop: ## Stop and delete the vertica container.
.PHONY: vertica-start
vertica-start: etc/vertica-demo.conf ## start/restart the vertica container.
@source etc/vertica-demo.conf; \
if (($$(docker ps -a --no-trunc -q -f NAME="$$VERTICA_CONTAINER_NAME" | wc -l)==0)); then \
if [[ -z $$VERTICA_EULA ]] || [[ -z $$(docker ps -a --no-trunc -q -f NAME="$$VERTICA_CONTAINER_NAME") ]]; then \
$(MAKE) vertica-install; \
else \
bin/vertica-start; \
Expand Down
3 changes: 2 additions & 1 deletion bin/vertica-install
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ docker network create "$DOCKER_NETWORK" 2>/dev/null
VERTICA_RUNARGS+=( --network "$DOCKER_NETWORK" )

# clear out old container in case it had issues
docker container rm $VERTICA_CONTAINER_NAME 2>/dev/null
docker stop $VERTICA_CONTAINER_NAME >/dev/null 2>&1
docker container rm $VERTICA_CONTAINER_NAME >/dev/null 2>&1

docker run --detach "${VERTICA_RUNARGS[@]}" "${VERTICA_ENV[@]}" "$VERTICA_DOCKER_IMAGE" || abort $? "Could not create docker"

Expand Down

0 comments on commit 172454f

Please sign in to comment.