--[[
LuCI - Lua Configuration Interface
] ] --
local taskd = require " luci.model.tasks "
local btcpayserver_model = require " luci.model.btcpayserver "
local m , s , o
m = taskd.docker_map ( " btcpayserver " , " btcpayserver " , " /usr/libexec/apps/btcpayserver/btcpayserver.sh " ,
translate ( " BTCPay Server " ) ,
translate ( " BTCPay Server is a self-hosted, open-source cryptocurrency payment processor. It's secure, private, censorship-resistant and free. " )
.. " <br/> " .. translate ( " Official website: " ) .. ' <a href= \" https://docs.linuxserver.io/images/docker-btcpayserver \" target= \" _blank \" >https://docs.linuxserver.io/images/docker-btcpayserver/</a> ' )
s = m : section ( SimpleSection , translate ( " Container Status " ) )
s : append ( Template ( " btcpayserver/status " ) )
s = m : section ( TypedSection , " btcpayserver " , translate ( " Setup " ) , translate ( " The following parameters will only take effect during installation or upgrade: " ) )
s.addremove = false
s.anonymous = true
o = s : option ( Value , " port " , translate ( " Port " ) .. " <b>*</b> " )
o.rmempty = false
o.default = " 8888 "
o.datatype = " port "
o = s : option ( Value , " image_name " , translate ( " Lightning " ) .. " <b>*</b> " )
o.rmempty = false
o.datatype = " string "
o : value ( " clightning " , " clightning " )
o : value ( " lnd " , " lnd " )
o.default = " clightning "
local blocks = btcpayserver_model.blocks ( )
local home = btcpayserver_model.home ( )
o = s : option ( Value , " config_path " , translate ( " Network " ) .. " <b>*</b> " )
o.rmempty = false
o.datatype = " string "
o : value ( " mainnet " , " mainnet " )
o : value ( " testnet " , " testnet " )
o.default = " mainnet "
local paths , default_path = btcpayserver_model.find_paths ( blocks , home , " Configs " )
for _ , val in pairs ( paths ) do
o : value ( val , val )
end
o.default = default_path
return m