module("luci.controller.commands", package.seeall)
function index()
- entry({"admin", "system", "commands"}, firstchild(), _("Custom Commands"), 80).i18n = "commands"
+ entry({"admin", "system", "commands"}, firstchild(), _("Custom Commands"), 80)
entry({"admin", "system", "commands", "dashboard"}, template("commands"), _("Dashboard"), 1)
entry({"admin", "system", "commands", "config"}, cbi("commands"), _("Configure"), 2)
entry({"admin", "system", "commands", "run"}, call("action_run"), nil, 3).leaf = true
end
local function parse_cmdline(cmdid, args)
- local uci = require "luci.model.uci".cursor()
- local path = luci.dispatcher.context.requestpath
-
+ local uci = require "luci.model.uci".cursor()
if uci:get("luci", cmdid) == "command" then
local cmd = uci:get_all("luci", cmdid)
local argv = parse_args(cmd.command)
function action_public(cmdid, args)
local uci = require "luci.model.uci".cursor()
- if uci:get("luci", cmdid) == "command" and
+ if cmdid and
+ uci:get("luci", cmdid) == "command" and
uci:get("luci", cmdid, "public") == "1"
then
action_download(cmdid, args)