Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octoprint installation not allowing for dynamic installation/updates #1

Open
goeland86 opened this issue Feb 19, 2016 · 1 comment
Open

Comments

@goeland86
Copy link

goeland86 commented Feb 19, 2016

I booted up kamikaze and realized that octoprint as it was distributed would not allow for "online" updates as would be expected on octopi. Similarly, installing plugins had to be done from the command line.

This is a not so minor inconvenience...

So I created this bash script which will take the 16/02/2016 image of Kamikaze and restore its octoprint functionality.

WARNING: I don't know that all the changes I did to the octo user were required. Some may introduce some security risks. This is only a first draft at correcting the issue, and I sincerely appreciate anyone pointing out the flaws of my modifications so that I may correct them.

!/bin/bash

Execute as root

easy_install -U pip
pip install -U octoprint
passwd -u octo
usermod -p octo1234 octo
usermod -s /bin/bash octo
usermod -a -G staff octo
echo "DenyUsers octo" >> /etc/ssh/sshd_config
cd /home/octo
git clone https://github.com/foosel/OctoPrint.git
chown octo:octo -R OctoPrint
chmod 664 /usr/local/lib/python2.7/dist-packages/easy-install.pth
su octo
cd ~/OctoPrint/
python setup.py clean
python setup.py install
exit
sed -i -e "s/bin/octoprint/local/bin/octoprint/g" /etc/systemd/system/multi-user.target.wants/octoprint.service
systemctl daemon-reload
systemctl restart octoprint.service

@goeland86
Copy link
Author

To check if all the changes have been taken into account, use
systemctl status -l -n 100 octoprint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant