%
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")
-%>
<% 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 %>