View Single Post
Old 09-11-2015, 04:29 AM   #6
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)
I use the following systemd service on linux:

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

[Service]
EnvironmentFile=/%h/.config/calibre/servers/%i.conf
ExecStart=/usr/bin/calibre-server \
    --port="${port}" \
    --with-library "${path}" \
    --restriction "${restriction}" \
    --user "${user}" \
    --pass "${pass}"

[Install]
WantedBy=default.target
And in my calibre configuration folder I created a folder called servers, with ${library}.conf files:
Code:
[eschwartz@arch ~]$ cat ~/.config/calibre/servers/template.conf
path="/home/eschwartz/Calibre_Libraries/My_Library_Name"
port="8080"
restriction="some_restriction"
user="username"
pass="password"
Easy template for adding new libraries, and starts at login.


The Content Server is currently in the midst of a major rewrite, I believe one of the features will be starting multiple libraries in the same invocation but not sure of the exact details.
Server read/write mode and multiple libraries has long been suggested as a feature of the eventual rewrite, among other things.
eschwartz is offline   Reply With Quote