PDA

View Full Version : Daemonize Calibre Server




avingochea
May 17, 2011, 07:58 PM
Can somebody please help me with this? I found this page online to run the Calibre server as a daemon using applescript; I can't seem to save the file, however. When I try to compile the applescript i get error "Syntax Error - Expected end of line, etc. but found unknown token." with that period on the second line highlited ". /etc/rc.common"

Any help would be appreciated

http://oldbugs.calibre-ebook.com/wiki/OSXDaemon



Hansr
May 17, 2011, 08:01 PM
That's a shell script not Apple script.

avingochea
May 17, 2011, 08:48 PM
Damn... sorry bout that, I'll try again; Thanks alot :p

avingochea
May 17, 2011, 09:23 PM
Just tried it, and still don't get it... Would somebody be willing to stupify these instructions? I saved the two files it said to, changed the permissions to 755 and 644 for Shell Script & Plist files respectively, nothing happened though when I restarted the computer...

Hansr
May 18, 2011, 03:19 AM
Did you try connecting to localhost:8080?

avingochea
May 18, 2011, 10:28 PM
Yes sir, it doesn't come up on the Stanza iPhone app. I also can't find it in the activity monitor :confused:

killer54291
Nov 5, 2011, 06:19 PM
How about this. Type this in Terminal (/Applications/Utilities/Terminal.app) and reply with the output. You have to replace the stuff.
su librarian -c "/Applications/calibre.app/Contents/MacOS/calibre-serve\
--username=<some name> \
--password=<something> \
--port=9903 \
--max-opds-items=100 \
--with-library=/Calibre \
--pidfile=/Calibre/calibre-server.pid

By the way, I hope you know the URL is http://localhost:9903/ as set in the options. It's not http://localhost:8080

Edit: Plus, in that command and in the script it's running "calibre-serve" while, at least in version 0.8.24, the executable is "calibre-server". Nonetheless, try the above.

Should say command not found. In which case, run this:
su librarian -c "/Applications/calibre.app/Contents/MacOS/calibre-server\
--username=<some name> \
--password=<something> \
--port=9903 \
--max-opds-items=100 \
--with-library=/Calibre \
--pidfile=/Calibre/calibre-server.pid
Now it should show some output. If it says "command not found" again, move calibre.app to /Applications. Then try. And make sure your calibre library location is set to /Calibre.