new option docker-status --stop to stop (end therefore restart) a container

master
Marc Wäckerlin 7 years ago
commit 39441c5343
  1. 12
      docker-status

@ -1,13 +1,10 @@
#!/bin/bash -e #!/bin/bash -e
############################################################################ begin logging ############################################################################ begin logging
# check if stdout is a terminal... # see if it supports colors...
if test -t 1; then ncolors=$(tput colors)
# see if it supports colors... if test -n "$ncolors" && test $ncolors -ge 8; then
ncolors=$(tput colors)
if test -n "$ncolors" && test $ncolors -ge 8; then
bold="$(tput bold)" bold="$(tput bold)"
underline="$(tput smul)" underline="$(tput smul)"
standout="$(tput smso)" standout="$(tput smso)"
@ -20,7 +17,6 @@ if test -t 1; then
magenta="$(tput setaf 5)" magenta="$(tput setaf 5)"
cyan="$(tput setaf 6)" cyan="$(tput setaf 6)"
white="$(tput setaf 7)" white="$(tput setaf 7)"
fi
fi fi
append_msg() { append_msg() {
@ -174,7 +170,7 @@ services=$(for stack in ${stacks}; do
" "
for service in ${status}; do for service in ${status}; do
time=${service%%;*} time=${service%%;*}
echo "$(date -d "$(sed 's,about an* ,1 ,;s,less than an* ,0 ,' <<<${time})");${service#*;}" echo "$(date +%s -d "$(sed 's,about an* ,1 ,;s,less than an* ,0 ,' <<<${time})");${service#*;}"
done done
done | sort -hr) done | sort -hr)

Loading…
Cancel
Save