mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 12:32:12 +00:00
fix visual bug (sometimes only string PORTS is displayed)
This commit is contained in:
parent
8e8f94b1b4
commit
9e2313d7ca
1 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ myMAGENTA="[1;35m"
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue