tehkillerbee / mopidy-tidal

Tidal Backend plugin for Mopidy
Apache License 2.0
93 stars 28 forks source link

Session json file not created if started as s systemd service as a non-root user #40

Closed arrakis25 closed 2 years ago

arrakis25 commented 3 years ago

Hi Thanks for taking up on this project. I do not have a exact reproduction, running the latest version of mopidy and mopidy-tidal but it seems that if mopidy is started as a service the json session file is not created. The most likely culprit could be that the HOME environment variable is not set ?. The problem went away when I started manually the service using the owner (user mopidy). Can I suggest that in the configuration file there is an optional parameter to set the file where we want to put the session file?.

thanks a lot

tehkillerbee commented 3 years ago

Hello,

Thanks for using the plugin and thanks for your suggestion I will look into this issue, although I have not noticed it on my own test platform (I am running mopidy as a service as well).

According to the mopidy documentation, "When running Mopidy as a system service, configuration is read from /etc/mopidy/mopidy.conf, and not from ~/.config/mopidy/mopidy.conf". For this reason, the directory ~/.config/mopidy/has been used to store the json file.

So maybe it is a better idea to determine if HOME env. variable is set and if not, use /etc/mopidy/* as the output directory, instead of relying on the environmental variable being set.

tehkillerbee commented 2 years ago

Fixed in #45