View Single Post
Old 08-19-2015, 05:58 PM   #4
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)
If you use --daemonize then calibre-server will persist after you think you've killed it.
Excellent test for running server -- try to contact it.


Dunno what an upstart service should look like, but a working systemd unit should look like this:
Code:
[eschwartz@arch ~]$ cat ~/.config/systemd/user/calibre-server.service
[Unit]
Description=Main calibre server
After=network.target

[Service]
Type=forking
PIDFile=/%t/calibre.pid
ExecStart=/usr/bin/calibre-server \
    --daemonize \
    --port=8080 \
    --pidfile=/%t/calibre.pid \
    --with-library /media/PORTABLEAPP/PortableApps/calibrePortable/Data/Amazon \
    --restriction contentserve

[Install]
WantedBy=default.target

Last edited by eschwartz; 08-19-2015 at 06:08 PM.
eschwartz is offline   Reply With Quote