diff --git a/docker_test.sh b/docker_test.sh index f1819cb1f06b6805df4d029e0c4c2c67907af09e..283b814067d76969e96d6fa90b87e32ae70394e3 100755 --- a/docker_test.sh +++ b/docker_test.sh @@ -1,7 +1,5 @@ #!/bin/bash -set -e - usage() { echo -e "usage:\t$0 DIRECTORY, e.g. $0 pica-mattermost" echo -e "\tDIRECTORY : name of the directory containing docker-compose.yml\n" @@ -83,7 +81,8 @@ done echo -e "\n==== Remove and re-create named external volumes ====" for v in $(docker-compose config --volumes); do - if [ grep $v -A 1 docker-compose.yml | grep 'external' ]; then + res=$(grep $v -A 1 docker-compose.yml | grep 'external' || true) + if [ ! -z $res ]; then # Don't fail if volume does not exists docker volume rm "$v" || true docker volume create "$v" diff --git a/pica-plume/entrypoint.sh b/pica-plume/entrypoint.sh index a5e8ab8672da22c68e157a7c42c9f4210b5aa0d8..c9115d9077c835cd4809e31cf0e4d0346dd6feb3 100755 --- a/pica-plume/entrypoint.sh +++ b/pica-plume/entrypoint.sh @@ -45,7 +45,7 @@ if [ ! -f ${FIRSTLAUNCH_PATH} ]; then fi # Check if we updated since last launch -if [ "${PLUME_VERSION}" != $(cat ${FIRSTLAUNCH_PATH}) ]; then +if [ "${PLUME_VERSION}" != "$(cat ${FIRSTLAUNCH_PATH})" ]; then # If so, we need to run migrations echo "Instance updated since last launch, running migrations..." plm migration run