I'm creating a small monitoring system with my bananapi. I just connected a webcam to the USB port and now I want to be able to start and stop it via a web interface. I have done something similar with a router and OpenWrt: I had a web interface which made sure that a shell script got executed, based on the page that was requested. So for example, when going to 192.168.1.1/api/usb/off, it turned the power of the usb off.
I want to do something similar with the bananapi but currently I'm stuck at getting the combination of nginx and lua to work. I used lua code to execute the shell commands when I was using OpenWrt, so I was hoping that I can reuse some of my lua code on my bananpi. So far I was able to install nginx, but not with HttpLuaModule, which is needed for lua code execution.
Does anyone know a way to make this work? Other ideas are welcome as well! For example, instead of a lua script, a shell script that gets executed when a certain URL is loaded. Or maybe an other webserver package than the nginx, like the uhttpd one used by OpenWrt.