diff --git a/scripts/postgre-upgrade.sh b/scripts/postgre-upgrade.sh index fe38c933f..f333fd227 100644 --- a/scripts/postgre-upgrade.sh +++ b/scripts/postgre-upgrade.sh @@ -77,7 +77,7 @@ test_docker_compose() { if [[ -f "$FM_PATH/docker-compose.yml" ]] then - if [[ $(docker-compose ps | grep postgres) = 0 ]] + if docker-compose ps | grep postgres then TYPE="DOCKER-COMPOSE" local container_id, ip @@ -121,7 +121,7 @@ ensure_pg_down() { if [ -f "$PG_PATH/postmaster.pid" ]; then echo 'ERROR: lock file "postmaster.pid" exists' - if [[ $(docker-compose ps | grep postgres) = 1 ]]; then + if ! docker-compose ps | grep postgres; then read -rp 'docker-compose container is not running. Confirm delete the lock file? (y/N) ' confirm