Merge pull request #44 from konstruktoid/shellcheck

shellcheck fixes
This commit is contained in:
Thomas Sjögren 2015-06-23 21:20:50 +02:00
commit 88566a8f9f

View file

@ -40,7 +40,7 @@ images=$(docker images -q | wc -l | awk '{print $1}')
active_images=0
for c in $(docker inspect -f "{{.Image}}" $(docker ps -qa)); do
if docker images --no-trunc -a | grep $c > /dev/null ; then
if docker images --no-trunc -a | grep "$c" > /dev/null ; then
active_images=$(( active_images += 1 ))
fi
done
@ -61,7 +61,7 @@ fi
check_6_7="6.7 - Avoid container sprawl"
total_containers=$(docker info 2>/dev/null | grep "Containers" | awk '{print $2}')
running_containers=$(docker ps -q | wc -l | awk '{print $1}')
diff="$(($total_containers - $running_containers))"
diff="$((total_containers - running_containers))"
if [ "$diff" -gt 25 ]; then
warn "$check_6_7"
warn " * There are currently a total of $total_containers containers, with only $running_containers of them currently running"