touchprint/stage2/05-mjpgstreamer/01-run.sh
Logan Gartner bd1dd3554f
Added MJPG Streamer. OctoPrint now uses Nginx reverse proxy
MJPG streamer has been added to allow for video to work inside of
OctoPrint (url is http://rpi-ip/webcam/)

OctoPrint + MJPG now uses Nginx as a reverse proxy. This is to simpify
the frontend and eventually this will allow me to add HTTPS support

Changed dialogrc background color to black to save eyeballs
2020-08-14 18:20:36 -06:00

18 lines
443 B
Bash
Executable file

#!/bin/bash -e
install -m 644 files/mjpg-streamer.service ${ROOTFS_DIR}/etc/systemd/system/mjpg-streamer.service
install -m 755 files/start-mjpg ${ROOTFS_DIR}/usr/local/bin/start-mjpg
on_chroot << EOF
if ! which mjpg_streamer; then
cd /tmp
rm -rf /tmp/mjpg-streamer
git clone https://github.com/jacksonliam/mjpg-streamer/
cd mjpg-streamer/mjpg-streamer-experimental/
make
make install
cd /
rm -rf /tmp/mjpg-streamer
fi
EOF