diff --git a/luasrc/view/btcpayserver/status.htm b/luasrc/view/btcpayserver/status.htm index bf99d86..8dca7fd 100644 --- a/luasrc/view/btcpayserver/status.htm +++ b/luasrc/view/btcpayserver/status.htm @@ -1,31 +1,31 @@ <% local util = require "luci.util" local container_status = util.trim(util.exec("/usr/libexec/apps/btcpayserver/btcpayserver.sh status")) -local container_install = (string.len(container_status) > 0) -local container_running = container_status == "running" +local container_running = string.find(string.lower(container_status), "up") and string.find(string.lower(container_status), "(healthy)") -%> +
- +
<% if container_running then %> - + <% else %> - + <% end %>
+ <% if container_running then - local port=util.trim(util.exec("/usr/libexec/apps/btcpayserver/btcpayserver.sh port")) + local port = util.trim(util.exec("/usr/libexec/apps/btcpayserver/btcpayserver.sh port")) if port == "" then - port="3000" + port = "3000" end -%>
- - +
<% end %>