null if no config file

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2017-02-22 09:37:42 +01:00
parent 1f499387c6
commit ff314754a3

View file

@ -87,12 +87,10 @@ get_docker_configuration_file_args() {
if [ -f "$FILE" ]; then
CONFIG_FILE="$FILE"
elif [ -f '/etc/docker/daemon.json' ]; then
CONFIG_FILE='/etc/docker/daemon.json'
else
CONFIG_FILE="/etc/docker/daemon.json"
fi
if ! grep "$OPTION" "$CONFIG_FILE"; then
echo 0
CONFIG_FILE='/dev/null'
fi
}