dbarzin / pandora-box

USB Scanning device
GNU General Public License v3.0
20 stars 2 forks source link

Pandora service not starting on boot #7

Closed Foxi352 closed 1 year ago

Foxi352 commented 1 year ago

Pandora service did not autostart after initial setup. I don't know if the poetry install path has changed in between or if this is an Ubuntu only thing, but poetry is installed in /home//.local and not in /home//.poetry

To make pandora work i had to modify the line

Environment="PATH=/home/swagener/.local/bin:/usr/bin"

in /etc/systemd/system/pandora.service

So i suggest to change the pandora.service file to:

[Unit]
Description=Pandora service
After=network.target

[Service]
User=_USER_
Group=_USER_
Type=forking
WorkingDirectory=/home/_USER_/pandora
Environment="PATH=/home/_USER_/.local/bin:/usr/bin"
Environment="PANDORA_HOME=/home/_USER_/pandora"
ExecStart=/bin/bash -c "exec poetry run start"
ExecStop=/bin/bash -c "exec poetry run stop"
StandardOutput=append:/var/log/pandora_message.log
StandardError=append:/var/log/pandora_error.log

[Install]
WantedBy=multi-user.target
Foxi352 commented 1 year ago

Maybe linked to changes due to https://github.com/dbarzin/pandora-box/issues/6 ?

dbarzin commented 1 year ago

Thank you, I will fix that and create a GitHub Action to test the installation and ensure non regressions.

dbarzin commented 1 year ago

Fixed !