From a65748bfe77c099f7967b23798e2b359ee6ee4ae Mon Sep 17 00:00:00 2001 From: riley Date: Tue, 12 Sep 2023 12:12:38 -0400 Subject: [PATCH] Fixed status.htm polling --- luasrc/view/btcpayserver/status.htm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 %>