Guide to Setup Streaming Web Cam on the Yun

nano /www/cgi-bin/mjpg-restart.cgi
#!/bin/ash
/etc/init.d/mjpg-streamer restart
echo "Content-type: text/html"
echo ""
echo "Restart..."
exit 0
chmod 755 /www/cgi-bin/mjpg-restart.cgi

http://arduino.local/cgi-bin/mjpg-restart.cgi

nano /www/webcam/stream.html
...
<form action="http://arduino.local/cgi-bin/mjpg-restart.cgi" method="get" target="_blank">
    <input type="submit" value="Restart">
</form>
...

http://arduino.local:8080/stream.html

substitute start,stop for restart if you needed.