[luci] Template button execute lua code

Jo-Philipp Wich xm at subsignal.org
Thu Sep 4 13:29:46 CEST 2014


Hi Ryan.

A tempalte can execute arbritary Lua code, so yes - you can trigger a
shell script as well. You should take care of stdio to not accidentially
send script output to the HTTP client which could mess up headers etc.

<%
  os.execute("/path/to/script.sh >/dev/null")
%>

~ Jow


More information about the luci mailing list