mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
revert if cmd to using 0
This commit is contained in:
parent
719bb31968
commit
5fb1ad781b
@ -65,7 +65,8 @@ test_docker_compose()
|
||||
{
|
||||
if [[ -f "$FM_PATH/docker-compose.yml" ]]
|
||||
then
|
||||
if docker-compose ps | grep postgres 2>/dev/null
|
||||
docker-compose ps | grep postgres
|
||||
if [[ $? = 0 ]]
|
||||
then
|
||||
TYPE="DOCKER-COMPOSE"
|
||||
fi
|
||||
@ -102,7 +103,8 @@ ensure_pg_down()
|
||||
{
|
||||
if [ -f "$PG_PATH/postmaster.pid" ]; then
|
||||
echo 'ERROR: lock file "postmaster.pid" exists'
|
||||
if ! docker-compose ps | grep postgres 2>/dev/null; then
|
||||
docker-compose ps | grep postgres
|
||||
if [[ $? = 1 ]]; 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