luci-base: add reboot rpc call
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
29ccea14f1
commit
1d68853cce
2 changed files with 7 additions and 1 deletions
|
@ -685,6 +685,12 @@ local methods = {
|
|||
local util = require "luci.util"
|
||||
return { result = (os.execute(string.format("/bin/umount %s", util.shellquote(args.path))) == 0) }
|
||||
end
|
||||
},
|
||||
|
||||
setReboot = {
|
||||
call = function()
|
||||
return { result = (os.execute("/sbin/reboot >/dev/null 2>&1") == 0) }
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
"ubus": {
|
||||
"file": [ "write", "remove", "exec" ],
|
||||
"iwinfo": [ "scan" ],
|
||||
"luci": [ "setInitAction", "setLocaltime", "setPassword", "setBlockDetect", "setUmount" ],
|
||||
"luci": [ "setInitAction", "setLocaltime", "setPassword", "setBlockDetect", "setUmount", "setReboot" ],
|
||||
"uci": [ "add", "apply", "confirm", "delete", "order", "set", "rename" ]
|
||||
},
|
||||
"uci": [ "*" ]
|
||||
|
|
Loading…
Reference in a new issue