lxc.lua 659 B

12345678910111213141516171819202122232425262728293031
  1. --[[
  2. LuCI LXC module
  3. Copyright (C) 2014, Cisco Systems, Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Author: Petar Koretic <petar.koretic@sartura.hr>
  9. ]]--
  10. local fs = require "nixio.fs"
  11. m = Map("lxc", translate("LXC Containers"))
  12. if fs.access("/etc/config/lxc") then
  13. m:section(SimpleSection).template = "lxc"
  14. s = m:section(TypedSection, "lxc", translate("Options"))
  15. s.anonymous = true
  16. s.addremove = false
  17. s:option(Value, "url", translate("Containers URL"))
  18. end
  19. return m