From bd29236c47fd0e8ab50081f978a83640f509f32d Mon Sep 17 00:00:00 2001 From: t3chn0m4g3 Date: Mon, 15 Aug 2016 05:46:57 +0000 Subject: [PATCH] tweaking dps.sh --- installer/bin/dps.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/installer/bin/dps.sh b/installer/bin/dps.sh index b0f064ae..94a93064 100755 --- a/installer/bin/dps.sh +++ b/installer/bin/dps.sh @@ -1,2 +1,17 @@ #/bin/bash -docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" -f status=running -f status=exited | GREP_COLORS='mt=01;35' egrep --color=always "(^[_a-z-]+ |$)|$" | GREP_COLORS='mt=01;32' egrep --color=always "(Up[ 0-9a-Z ]+ |$)|$" | GREP_COLORS='mt=01;31' egrep --color=always "(Exited[ \(0-9\) ]+ [0-9a-Z ]+ ago|$)|$" +while true + do + clear + echo "======| System |======" + echo Date:" "$(date) + echo Uptime:" "$(uptime) + echo CPU temp: $(sensors | grep "Physical" | awk '{ print $4 }') + echo + /usr/bin/docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" -f status=running -f status=exited | GREP_COLORS='mt=01;35' /bin/egrep --color=always "(^[_a-z-]+ |$)|$" | GREP_COLORS='mt=01;32' /bin/egrep --color=always "(Up[ 0-9a-Z ]+ |$)|$" | GREP_COLORS='mt=01;31' /bin/egrep --color=always "(Exited[ \(0-9\) ]+ [0-9a-Z ]+ ago|$)|$" + if [ "$1" = "" ]; + then + break; + else + sleep $1 + fi +done