Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ansible/roles/container_kill_start/files/findTagRunning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ if [ "" = "${CONTAINERS}" ] ; then
exit 0
else
for container in ${CONTAINERS} ; do
docker inspect ${container} | grep -q ${IMAGE_NAME}
docker inspect "${container}" | grep -q '"Image": "'"${IMAGE_NAME}":
if [ ${?} -eq 0 ] ; then
if [ -z ${RUNNING_CONTAINERS} ] ; then
if [ -z "${RUNNING_CONTAINERS}" ] ; then
RUNNING_CONTAINERS="${container}"
else
RUNNING_CONTAINERS="${RUNNING_CONTAINERS} ${container}"
Expand All @@ -18,6 +18,6 @@ else
done
fi

if [ ! -z ${RUNNING_CONTAINERS} ] ; then
if [ ! -z "${RUNNING_CONTAINERS}" ] ; then
echo "${RUNNING_CONTAINERS}"
fi
6 changes: 3 additions & 3 deletions ansible/roles/container_start/files/findTagRunning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ if [ "" = "${CONTAINERS}" ] ; then
exit 0
else
for container in ${CONTAINERS} ; do
docker inspect ${container} | grep -q ${IMAGE_NAME}
docker inspect "${container}" | grep -q '"Image": "'"${IMAGE_NAME}":
if [ ${?} -eq 0 ] ; then
if [ -z ${RUNNING_CONTAINERS} ] ; then
if [ -z "${RUNNING_CONTAINERS}" ] ; then
RUNNING_CONTAINERS="${container}"
else
RUNNING_CONTAINERS="${RUNNING_CONTAINERS} ${container}"
Expand All @@ -18,6 +18,6 @@ else
done
fi

if [ ! -z ${RUNNING_CONTAINERS} ] ; then
if [ ! -z "${RUNNING_CONTAINERS}" ] ; then
echo "${RUNNING_CONTAINERS}"
fi