From eb0145ddd5908f504bea1ed43e9c3ade3e53734b Mon Sep 17 00:00:00 2001 From: riley Date: Tue, 17 Oct 2023 17:40:26 -0400 Subject: [PATCH] Lil refactor --- luasrc/view/whoogle/status.htm | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/luasrc/view/whoogle/status.htm b/luasrc/view/whoogle/status.htm index 6380ddd..c60fcc4 100644 --- a/luasrc/view/whoogle/status.htm +++ b/luasrc/view/whoogle/status.htm @@ -2,22 +2,19 @@ local util = require "luci.util" local container_status = util.trim(util.exec("/usr/libexec/apps/whoogle/whoogle.sh status")) local container_running = string.match(string.lower(container_status), "^up%W") +local port = util.trim(util.exec("/usr/libexec/apps/whoogle/whoogle.sh port")) +if port == "" then + port="1880" +end -%> +
<% if container_running then %> - + + <% else %> - - <% end %> - <% if container_running then %> - <% - local port=util.trim(util.exec("/usr/libexec/apps/whoogle/whoogle.sh port")) - if port == "" then - port="1880" - end - -%> - + <% end %>