diff options
author | Florian Eckert <fe@dev.tdt.de> | 2020-07-29 11:30:31 +0200 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2020-07-29 11:42:53 +0200 |
commit | 543498d88e79ae47e057519aecedeb8b50b56949 (patch) | |
tree | 85b85475adcbfabfc26cd26086e83f7585aa26ff /applications/luci-app-dockerman/luasrc/model | |
parent | 141857a12adf18c62b4b8cae775870aa88374f02 (diff) |
luci-app-dockerman: model/docker: update debug handling
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-dockerman/luasrc/model')
-rw-r--r-- | applications/luci-app-dockerman/luasrc/model/docker.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/applications/luci-app-dockerman/luasrc/model/docker.lua b/applications/luci-app-dockerman/luasrc/model/docker.lua index 88b5cc4607..aadc0cdaa7 100644 --- a/applications/luci-app-dockerman/luasrc/model/docker.lua +++ b/applications/luci-app-dockerman/luasrc/model/docker.lua @@ -273,9 +273,9 @@ _docker.new = function() local host = nil local port = nil local socket = nil + local debug_path = nil local remote = uci:get_bool("dockerd", "globals", "remote_endpoint") - if remote then host = uci:get("dockerd", "globals", "remote_host") or nil port = uci:get("dockerd", "globals", "remote_port") or nil @@ -283,12 +283,17 @@ _docker.new = function() socket = uci:get("dockerd", "globals", "socket_path") or "/var/run/docker.sock" end + local debug = uci:get_bool("dockerd", "globals", "debug") + if debug then + debug_path = uci:get("dockerd", "globals", "debug_path") or "/tmp/.docker_debug" + end + _docker.options = { host = host, port = port, socket_path = socket, - debug = uci:get("dockerd", "globals", "debug") == 'true' and true or false, - debug_path = uci:get("dockerd", "globals", "debug_path") or "/tmp/.docker_debug", + debug = debug, + debug_path = debug_path, status_path = uci:get("dockerd", "globals", "status_path") or "/tmp/.docker_status" } |