Advertisement
Ciemny_Cygan

octoprint-install

Feb 5th, 2021
1,023
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.09 KB | None | 0 0
  1. #!/bin/bash
  2. sudo apt update ; sudo apt upgrade
  3. sudo apt install git psmisc python3 python-pip python-dev python-setuptools virtualenv
  4. sudo adduser octoprint
  5. sudo adduser octoprint sudo
  6. sudo usermod -a -G tty octoprint
  7. sudo usermod -a -G dialout octoprint
  8. sudo passwd octoprint -d
  9. echo "octoprint ALL=(ALL) NOPASSWD:ALL" ; read
  10. sudo visudo
  11. sudo su - octoprint
  12. cd ~
  13. wget "https://pypi.python.org/packages/source/p/pyserial/pyserial-3.5.tar.gz"
  14. tar -zxf pyserial-3.5.tar.gz
  15. cd pyserial-3.5
  16. sudo python3 setup.py install
  17. cd ~
  18. git clone "https//github.com/foosel/OctoPrint.git"
  19. virtualenv venv
  20. ./venv/bin/python setup.py install
  21. ~/OctoPrint/venv/bin/octoprint serve
  22. echo "OctoPrint Server port is 5000!" ; read
  23. sudo cp ~/OctoPrint/scripts/octoprint.init /etc/init.d/octoprint
  24. sudo chmod +x /etc/init.d/octoprint
  25. sudo cp ~/OctoPrint/scripts/octoprint.default /etc/default/octoprint
  26. echo "Change user account from 'pi' to 'octoprint'"
  27. echo "enable and change the daemon directory to '/home/octoprint/OctoPrint/venv/bin/octoprint"
  28. sudo update-rc.d octoprint defaults
  29. sudo service octoprint start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement