Modify get_docker_configuration_file_args in order to handle daemon.json better,

and also address missing files issue.

Closes 
Closes 

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2017-03-21 14:49:42 +01:00
parent d5894203c6
commit 91e625b8e4
3 changed files with 23 additions and 19 deletions

View file

@ -67,13 +67,15 @@ fi
# 2.6
check_2_6="2.6 - Configure TLS authentication for Docker daemon"
if get_docker_configuration_file_args 'tls' | grep true >/dev/null 2>&1; then
if get_docker_configuration_file_args 'tlskey' | grep -v '""' >/dev/null 2>&1; then
if get_docker_configuration_file_args 'tlsverify' | grep 'true' >/dev/null 2>&1; then
pass "$check_2_6"
else
warn "$check_2_6"
warn " * Docker daemon currently listening on TCP with TLS, but no verification"
if grep -i 'tcp://' "$CONFIG_FILE" 2>/dev/null 1>&2; then
if get_docker_configuration_file_args '"tls":' | grep 'true' 2>/dev/null 1>&2; then
if get_docker_configuration_file_args 'tlskey' | grep -v '""' >/dev/null 2>&1; then
if get_docker_configuration_file_args 'tlsverify' | grep 'true' >/dev/null 2>&1; then
pass "$check_2_6"
else
warn "$check_2_6"
warn " * Docker daemon currently listening on TCP with TLS, but no verification"
fi
fi
else
warn "$check_2_6"