Skip to content

Commit bbf48ec

Browse files
committed
Update OctoPrint install path to /opt/octopi
1 parent 9d0dd2d commit bbf48ec

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/scripts/01-update-octoprint

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ export LC_ALL=C
66
source /common.sh
77
install_cleanup_trap
88

9-
sudo -u pi /home/pi/oprint/bin/pip install -U OctoPrint
9+
OCTOPI_OPT_FOLDER=/opt/octopi
10+
OCTOPI_OCTOPRINT_FOLDER="${OCTOPI_OPT_FOLDER}"/oprint
11+
PIP="${OCTOPI_OCTOPRINT_FOLDER}"/bin/pip
12+
sudo -u pi "${PIP}" install -U OctoPrint

src/scripts/03-install-klipper

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ install_cleanup_trap
2727
# Install Klipper
2828
apt-get -y --allow-downgrades --allow-remove-essential --allow-change-held-packages install virtualenv python3 python3-dev libffi-dev build-essential libncurses-dev libusb-dev avrdude gcc-avr binutils-avr avr-libc stm32flash dfu-util libnewlib-arm-none-eabi gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0
2929

30-
pushd /home/pi
30+
OCTOPI_OPT_FOLDER=/opt/octopi
31+
OCTOPI_OCTOPRINT_FOLDER="${OCTOPI_OPT_FOLDER}"/oprint
32+
PIP="${OCTOPI_OCTOPRINT_FOLDER}"/bin/pip
33+
pushd "${OCTOPI_OPT_FOLDER}"
3134
# Mostly taken from klipper/scripts/install-octopi.sh
3235
sudo -u pi git clone -b "$KLIPPER_BRANCH" --depth $KLIPPER_DEPTH "$KLIPPER_REPO" klipper
3336
sudo -u pi virtualenv -p python3 klippy-env
@@ -46,7 +49,7 @@ cp /files/klipper/default /etc/default/klipper
4649
chmod 644 /etc/default/klipper
4750

4851
# Install plugin
49-
sudo -u pi /home/pi/oprint/bin/pip install "${KLIPPER_OCTOKLIPPER_URL}"
52+
sudo -u pi "${PIP}" install "${KLIPPER_OCTOKLIPPER_URL}"
5053

5154
# Merge config
52-
sudo -u pi /home/pi/oprint/bin/python /files/merge-settings.py /files/octoprint/config.yaml /home/pi/.octoprint/config.yaml
55+
sudo -u pi "${OCTOPI_OCTOPRINT_FOLDER}"/bin/python /files/merge-settings.py /files/octoprint/config.yaml /home/pi/.octoprint/config.yaml

0 commit comments

Comments
 (0)