%
local util = require "luci.util"
local container_status = util.trim(util.exec("/usr/libexec/apps/libreddit/libreddit.sh status"))
local container_install = (string.len(container_status) > 0)
local container_running = container_status == "running"
-%>
<% if container_running then %>
<% else %>
<% end %>
<%
if container_running then
local port=util.trim(util.exec("/usr/libexec/apps/libreddit/libreddit.sh port"))
if port == "" then
port="5741"
end
-%>
<% end %>