#!/bin/bash . variables.inc.sh echo echo "Starting: helper_post" set -xe [ -e /home/pi/klipper ] && { su - pi -c "cd /home/pi/klipper \ && git pull \ " : } || { su - pi -c "cd /home/pi \ && git clone --depth=1 $GITEA_BASE/klipper.git \ && (cd klipper && git config pull.rebase false) \ && ./klipper/scripts/install-octopi.sh \ " } install -m644 -o 0 -g 0 $ConfigsHome/etc/default/klipper /etc/default/klipper systemctl enable klipper 2>/dev/null systemctl disable octoprint 2>/dev/null systemctl restart klipper 2>/dev/null &