Running .sh file using html page

Hi everyone
I have .sh file on the router, how to run it using html page from the router,
So basically i go to like 192.168.1.1/scripts/index.html
and just click thr button and run the script in the router?

I read about uhttpd but i lost

Connect using ssh and run the script?
Or if you want to use a web based environment imstall luci-app-ttyd?

You can do that from the custom commands.
http://openwrt.lan/cgi-bin/luci/admin/system/commands

I'm trying to do a simple web page that run wake on lan script for me without using the ssh or luci ui

Isn't there a package for that, in Openwrt?

thank you, It's useful, and I think it can do the job, but is there an answer for my question about building custom html page to do that?

thank you very much :), I will check it and let you know if it work

It does the job and can also create a url to run it. If you had clicked the button Link you'd see that.

You can directly use CGI Script

example

touch /www/cgi-bin/cig-test
chmod +x /www/cgi-bin/cig-test

file contents

#!/bin/sh
echo "Content-type: text/html"
echo ""

echo "<ul>"
while IFS='=' read -r -d '' n v; do
	printf "<li>%s=%s</li>" "$n" "$v"
done < <(env -0)
echo "</ul>"

URL: http://192.168.1.1/cgi-bin/cig-test