View Single Post
Old 06-28-2017, 07:50 PM   #3
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Well, the systemd service is started as root, but calibre defaults to looking at the user database in "${XDG_CONFIG_HOME:-$HOME/.config}/calibre/server-users.sqlite". So you have edited it in /home/dom134/ (or whatever your username is) and then the systemd instance tried accessing it in /root/

You can pass the --userdb /path/to/server-users.sqlite if you like, but I suggest running calibre-server under your systemd user instance.

There is also no need for a pidfile, and if you don't specify a library calibre will fallback on serving all the libraries known to the GUI configuration.

Code:
[eschwartz@arch ~]$ cat ~/.config/systemd/user/calibre-server.service
[Unit]
Description=Main calibre server
After=network.target

[Service]
ExecStart=/usr/bin/calibre-server \
    --port=8080 \
    --enable-auth \
    --access-log=/%h/.local/share/calibre.log

[Install]
WantedBy=default.target
eschwartz is offline   Reply With Quote