From 9e2313d7ca91e5ada1399a81cd02103ff8035a6b Mon Sep 17 00:00:00 2001 From: Marco Ochse Date: Mon, 7 Aug 2017 14:54:33 +0000 Subject: [PATCH] fix visual bug (sometimes only string PORTS is displayed) --- installer/bin/dps.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installer/bin/dps.sh b/installer/bin/dps.sh index c14bdcec..0c262732 100755 --- a/installer/bin/dps.sh +++ b/installer/bin/dps.sh @@ -10,7 +10,7 @@ myMAGENTA="" function fuCONTAINERSTATUS { local myNAME="$1" -local mySTATUS="$(/usr/bin/docker ps -f name=$i --format "table {{.Status}}" -f status=running -f status=exited | tail -n 1)" +local mySTATUS="$(/usr/bin/docker ps -f name=$myNAME --format "table {{.Status}}" -f status=running -f status=exited | tail -n 1)" myDOWN="$(echo "$mySTATUS" | grep -o -E "(STATUS|NAMES|Exited)")" case "$myDOWN" in @@ -33,9 +33,9 @@ printf "$mySTATUS" function fuCONTAINERPORTS { local myNAME="$1" -local myPORTS="$(/usr/bin/docker ps -f name=$i --format "table {{.Ports}}" -f status=running -f status=exited | tail -n 1 | sed s/","/",\n\t\t\t\t\t\t\t"/g)" +local myPORTS="$(/usr/bin/docker ps -f name=$myNAME --format "table {{.Ports}}" -f status=running -f status=exited | tail -n 1 | sed s/","/",\n\t\t\t\t\t\t\t"/g)" -if [ "$myDOWN" != "(STATUS|NAMES|Exited)" ]; +if [ "$myPORTS" != "PORTS" ]; then printf "$myBLUE$myPORTS$myWHITE" fi