Skip to content

Commit 3ce624a

Browse files
committed
Move conjur_container_alive to bin/util
1 parent 06e9abf commit 3ce624a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bin/util

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,13 @@ function get_conjur_admin_api_key(){
5353
admin_api_key=$(docker-compose exec -T conjur conjurctl role retrieve-key dev:user:admin | tr -d '\r')
5454
echo $admin_api_key
5555
}
56+
57+
function conjur_container_alive(){
58+
if [ -z `docker-compose ps -q conjur` ]; then
59+
echo 1
60+
elif [ -z `docker ps -q --no-trunc | grep $(docker-compose ps -q conjur)` ]; then
61+
echo 1
62+
else
63+
echo 0
64+
fi
65+
}

0 commit comments

Comments
 (0)