touchprint/stage2/04-octoprint/01-run.sh
Logan Gartner 0d495115aa
Replaced whiptail, moved OctoPrint, added plugin manager
Replaced whiptail with dialog since dialog has more features and looks
nicer imo

OctoPrint has been moved to /srv/octoprint

There is now an OctoPrint group as well as an OctoPrint user

First-time will now ask if you want to preinstall some curated plugins

Added warning advising end users that this is nowhere near production
ready.

Added more stuff to TODO

README improvements
2020-08-13 03:42:11 -06:00

16 lines
494 B
Bash
Executable file

#!/bin/bash -e
install -m 644 files/octoprint.service ${ROOTFS_DIR}/etc/systemd/system/octoprint.service
on_chroot << EOF
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