Files
OctoPrint/scripts
Matthias WeisandGina Häußge c2515f62e3 🩹 Fix deprecated service script example (#4840)
* fix deprecated service script example  #4839

* add me to the Authors

---------

Co-authored-by: Gina Häußge <gina@octoprint.org>

Closes #4839
2023-07-03 11:27:26 +02:00
..

init/systemd files for OctoPrint.

Assumes OctoPrint is installed under user pi at /home/pi/OctoPrint/venv/bin/octoprint. If you have a different setup you'll need to adjust octoprint.default (init) or octoprint.service (systemd) accordingly.

init

Download the init.d files to the locations shown:

octoprint.default   => /etc/default/octoprint
octoprint.init      => /etc/init.d/octoprint

Next, enable and start the octoprint service:

# Enable octoprint service
sudo update-rc.d octoprint defaults

# and start it
sudo service octoprint start

systemd

Download the systemd files to the locations shown:

octoprint.service   => /etc/systemd/system/octoprint.service

Next, make necessary modifications (if any) then notify systemd:

sudo systemctl daemon-reload

Finally, enable and start the octoprint service:

# Enable octoprint service
sudo systemctl enable octoprint

# and start it
sudo systemctl start octoprint