|
|
@ -1,7 +1,7 @@
|
|
|
|
<%
|
|
|
|
<%
|
|
|
|
local util = require "luci.util"
|
|
|
|
local util = require "luci.util"
|
|
|
|
local container_status = util.trim(util.exec("/usr/libexec/apps/frigate/frigate.sh status"))
|
|
|
|
local container_status = util.trim(util.exec("/usr/libexec/apps/frigate/frigate.sh status"))
|
|
|
|
local container_running = string.find(string.lower(container_status), "up") and string.find(string.lower(container_status), "(healthy)")
|
|
|
|
local container_running = string.match(string.lower(container_status), "^up%W")
|
|
|
|
-%>
|
|
|
|
-%>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="cbi-value">
|
|
|
|
<div class="cbi-value">
|
|
|
@ -18,7 +18,7 @@ local container_running = string.find(string.lower(container_status), "up") and
|
|
|
|
if container_running then
|
|
|
|
if container_running then
|
|
|
|
local port = util.trim(util.exec("/usr/libexec/apps/frigate/frigate.sh port"))
|
|
|
|
local port = util.trim(util.exec("/usr/libexec/apps/frigate/frigate.sh port"))
|
|
|
|
if port == "" then
|
|
|
|
if port == "" then
|
|
|
|
port="1880"
|
|
|
|
port="5100"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
-%>
|
|
|
|
-%>
|
|
|
|
<div class="cbi-value cbi-value-last">
|
|
|
|
<div class="cbi-value cbi-value-last">
|
|
|
|