mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
fix bash: if cmd
This commit is contained in:
parent
cbd93ca7d8
commit
cc74b42a2b
@ -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 </dev/tty
|
||||
if [ "$confirm" = "y" ]; then
|
||||
if [ "$(whoami)" = "root" ]; then COMMAND="rm"
|
||||
|
Loading…
x
Reference in New Issue
Block a user