Logan Gartner
bd1dd3554f
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
20 lines
643 B
Bash
Executable file
20 lines
643 B
Bash
Executable file
#!/bin/bash -e
|
|
|
|
install -m 644 files/octoprint.service ${ROOTFS_DIR}/etc/systemd/system/octoprint.service
|
|
|
|
install -m 644 files/nginx.conf ${ROOTFS_DIR}/etc/nginx/nginx.conf
|
|
echo -e "listen 80;" > ${ROOTFS_DIR}/etc/nginx/listen.conf
|
|
|
|
on_chroot << EOF
|
|
systemctl enable nginx
|
|
if ! pip list | grep -F octoprint; then
|
|
if [[ ! -d /srv/octoprint ]]; then mkdir -p /srv/octoprint; fi
|
|
cd /srv/octoprint || exit 1
|
|
chown octoprint:octoprint /srv/octoprint || exit 1
|
|
virtualenv venv || exit 1
|
|
source venv/bin/activate || exit 1
|
|
pip install pip --upgrade
|
|
pip install octoprint || exit 1
|
|
chown -R octoprint:octoprint /srv/octoprint
|
|
fi
|
|
EOF
|