%
local util = require "luci.util"
local container_status = util.trim(util.exec("/usr/libexec/apps/megamedia/megamedia.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/megamedia/megamedia.sh port"))
if port == "" then
port="9696"
end
-%>
<% end %>