commands.lua 938 B

123456789101112131415161718192021222324252627
  1. -- Copyright 2012 Jo-Philipp Wich <jow@openwrt.org>
  2. -- Licensed to the public under the Apache License 2.0.
  3. local m, s
  4. m = Map("luci", translate("Custom Commands"),
  5. translate("This page allows you to configure custom shell commands which can be easily invoked from the web interface."))
  6. s = m:section(TypedSection, "command", "")
  7. s.template = "cbi/tblsection"
  8. s.anonymous = true
  9. s.addremove = true
  10. s:option(Value, "name", translate("Description"),
  11. translate("A short textual description of the configured command"))
  12. s:option(Value, "command", translate("Command"),
  13. translate("Command line to execute"))
  14. s:option(Flag, "param", translate("Custom arguments"),
  15. translate("Allow the user to provide additional command line arguments"))
  16. s:option(Flag, "public", translate("Public access"),
  17. translate("Allow executing the command and downloading its output without prior authentication"))
  18. return m