I set up a CHIP SBC to act as a Web Camera host using motion and motioneye.
-
index.html belongs in /var/www/html (assuming apache2)
-
stats.sh belongs in /usr/lib/cgi-bin
-
pwrstat executable belongs in /usr/lib/cgi-bin
-
toggle.sh and toggle_light.py both go into /usr/lib/cgi-bin