Merge pull request #3526 from joshfriend/systemd-lang-env

Set LC_ALL and LANG when starting octoprint
This commit is contained in:
Gina Häußge authored and GitHub committed 2020-04-20 18:24:03 +02:00
commit 582c3739e7
3 files changed
+25

No files matched your search

+1
View File
@@ -118,6 +118,7 @@ date of first contribution):
* [Jim Neill](https://github.com/jneilliii)
* [Dustin Kerber](https://github.com/kerber)
* [Tobias Schürg](https://github.com/tobiasschuerg)
* [Josh Friend](https://github.com/joshfriend)
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
[Daid Braam](https://github.com/daid). Parts of its communication layer and
+22
View File
@@ -4,14 +4,36 @@ Assumes OctoPrint is installed under user pi at /home/pi/OctoPrint/venv/bin/octo
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:
```sh
# 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, enable and start the `octoprint` service:
```sh
# Enable octoprint service
sudo systemctl enable octoprint
# and start it
sudo systemctl start octoprint
```
+2
View File
@@ -4,6 +4,8 @@ After=network-online.target
Wants=network-online.target
[Service]
Environment="LC_ALL=C.UTF-8"
Environment="LANG=C.UTF-8"
Type=simple
User=pi
ExecStart=/home/pi/OctoPrint/venv/bin/octoprint