You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.8 KiB
Lua

1 year ago
--[[
LuCI - Lua Configuration Interface
]]--
local taskd = require "luci.model.tasks"
local owncast_model = require "luci.model.owncast"
local m, s, o
m = taskd.docker_map("owncast", "owncast", "/usr/libexec/apps/owncast/owncast.sh",
translate("owncast"),
translate("Owncast is an open source, self-hosted live video and chat server for use with existing popular broadcasting software. With streaming + chat out of the box you can take control over your content by running it yourself. For hosting with TorGuard Wireguard make sure to fw internal and external tcp port 1935")
.. translate("Official website:") .. ' <a href=\"https://owncast.online/\" target=\"_blank\">hhttps://owncast.online/</a>')
s = m:section(SimpleSection, translate("Service Status"), translate("owncast status:"))
s:append(Template("owncast/status"))
s = m:section(TypedSection, "owncast", translate("Setup"), translate("admin/password is default login. Please make note of your stream key."))
s.addremove=false
s.anonymous=true
o = s:option(Value, "port", translate("Port").."<b>*</b>")
o.rmempty = false
o.default = "8387"
o.datatype = "port"
o = s:option(Value, "image_name", translate("Image").."<b>*</b>")
o.rmempty = false
o.datatype = "string"
o:value("owncast/owncast:latest", "owncast/owncast:latest")
o.default = "owncast/owncast:latest"
local blocks = owncast_model.blocks()
local home = owncast_model.home()
o = s:option(Value, "config_path", translate("Config path").."<b>*</b>")
o.rmempty = false
o.datatype = "string"
o:value("/opt/docker2/compose/owncast", "/opt/docker2/compose/owncast")
o.default = "/opt/docker2/compose/owncast"
local paths, default_path = owncast_model.find_paths(blocks, home, "Configs")
for _, val in pairs(paths) do
o:value(val, val)
end
o.default = default_path
return m