summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-dockerman/luasrc/controller/dockerman.lua')
-rw-r--r--applications/luci-app-dockerman/luasrc/controller/dockerman.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/applications/luci-app-dockerman/luasrc/controller/dockerman.lua b/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
index a592f4b3a..608fbf4b0 100644
--- a/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
+++ b/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
@@ -14,18 +14,18 @@ function index()
entry({"admin", "docker", "overview"},cbi("dockerman/overview"),_("Overview"),0).leaf=true
- local remote = luci.model.uci.cursor():get("dockerd", "globals", "remote_endpoint")
- if remote == nil then
- local socket = luci.model.uci.cursor():get("dockerd", "globals", "socket_path")
- if socket and not nixio.fs.access(socket) then
- return
- end
- elseif remote == "true" then
+ local remote = luci.model.uci.cursor():get_bool("dockerd", "globals", "remote_endpoint")
+ if remote then
local host = luci.model.uci.cursor():get("dockerd", "globals", "remote_host")
local port = luci.model.uci.cursor():get("dockerd", "globals", "remote_port")
if not host or not port then
return
end
+ else
+ local socket = luci.model.uci.cursor():get("dockerd", "globals", "socket_path")
+ if socket and not nixio.fs.access(socket) then
+ return
+ end
end
if (require "luci.model.docker").new():_ping().code ~= 200 then