luci-app-dockerman: model/docker: update debug handling
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
141857a12a
commit
543498d88e
1 changed files with 8 additions and 3 deletions
|
@ -273,9 +273,9 @@ _docker.new = function()
|
||||||
local host = nil
|
local host = nil
|
||||||
local port = nil
|
local port = nil
|
||||||
local socket = nil
|
local socket = nil
|
||||||
|
local debug_path = nil
|
||||||
|
|
||||||
local remote = uci:get_bool("dockerd", "globals", "remote_endpoint")
|
local remote = uci:get_bool("dockerd", "globals", "remote_endpoint")
|
||||||
|
|
||||||
if remote then
|
if remote then
|
||||||
host = uci:get("dockerd", "globals", "remote_host") or nil
|
host = uci:get("dockerd", "globals", "remote_host") or nil
|
||||||
port = uci:get("dockerd", "globals", "remote_port") 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"
|
socket = uci:get("dockerd", "globals", "socket_path") or "/var/run/docker.sock"
|
||||||
end
|
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 = {
|
_docker.options = {
|
||||||
host = host,
|
host = host,
|
||||||
port = port,
|
port = port,
|
||||||
socket_path = socket,
|
socket_path = socket,
|
||||||
debug = uci:get("dockerd", "globals", "debug") == 'true' and true or false,
|
debug = debug,
|
||||||
debug_path = uci:get("dockerd", "globals", "debug_path") or "/tmp/.docker_debug",
|
debug_path = debug_path,
|
||||||
status_path = uci:get("dockerd", "globals", "status_path") or "/tmp/.docker_status"
|
status_path = uci:get("dockerd", "globals", "status_path") or "/tmp/.docker_status"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue