Run a command from within LuCI

Sorry for what may sound like a lazy question, but honestly I've looked for this for a few days and come up with bum nothing. Is there something like luci.exec() that we can use in the web interface to run system commands?

Did you ever run something like grep -r exec in the LuCI source repo during the last few days? :wink:

http://htmlpreview.github.io/?http://raw.githubusercontent.com/openwrt/luci/master/documentation/api/modules/luci.sys.html#call
http://htmlpreview.github.io/?http://raw.githubusercontent.com/openwrt/luci/master/documentation/api/modules/luci.sys.html#exec

1 Like

Nope, haha! Thanks, mate!

opkg update && opkg install luci-app-commands

  • I personally am not a fan of luci-app-commands, as it's far less secure than SSH, combined with it being far easier and more efficient to open up an SSH session versus logging into LuCI and waiting for web page requests.