touchprint/stage2/04-octoprint/01-run.sh
Logan Gartner b94fcfc1c9
Moving towards first beta release
OctoPrint port and listening IP can now be configured

First-time and Octo-Config now use a shared library reducing duplicate
code

Reverted output files to default format

Updated TODO
2020-08-14 01:40:24 -06:00

16 lines
493 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