--[[ LuCI - Lua Configuration Interface ]]-- local taskd = require "luci.model.tasks" local ghostblog_model = require "luci.model.ghostblog" local m, s, o m = taskd.docker_map("ghostblog", "ghostblog", "/usr/libexec/apps/ghostblog/ghostblog.sh", translate("Ghostblog"), translate("Ghost is a free and open source blogging platform written in JavaScript that is designed to simplify the process of online publishing.") .. translate("Official website:") .. ' https://ghostblog.com/') s = m:section(SimpleSection, translate("Service Status"), translate("Ghostblog status:")) s:append(Template("ghostblog/status")) s = m:section(TypedSection, "ghostblog", 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").."*") o.rmempty = false o.default = "2368" o.datatype = "port" o = s:option(Value, "image_name", translate("Image").."*") o.rmempty = false o.datatype = "string" o:value("ghost", "ghost") o.default = "ghost" local blocks = ghostblog_model.blocks() local home = ghostblog_model.home() o = s:option(Value, "config_path", translate("Config path").."*") o.rmempty = false o.datatype = "string" local paths, default_path = ghostblog_model.find_paths(blocks, home, "Configs") for _, val in pairs(paths) do o:value(val, val) end o.default = default_path return m