I am new to OpenMediaVault. I am currently trying to get calibre-server working. After setting up the data directory I get an error "Failed to execute command 'omv-mkconf calibre 2>&1': cp: cannot copy a directory, `/media/4bd32d88-e714-4773-b987-c66b21216c45/media/4bd32d88-e714-4773-b987-c66b21216c45/calibreserver//content', into itself, ".
I have made a number of attempts to setup this directory. This is my third directory that is now in the directory list.
I am clearly misunderstanding something.
A good tutorial on how this server is suppose to work might be the best thing along with some advice on how to start over on the configuration. I have removed the plugin and reinstalled and it retains my previous failed attempts in the drop down.
Installing and configuring Calibre-Server
-
- OMV 2.x
- jag567
-
-
I am not sure what you where trying to do, and what tutorial you are using, but I know that I used the process from the calibre website and it works.
I used omv 3 since calibre plug in is not available anymore..
Why are you using omv-mkconf?Sent from my SM-N910T using Tapatalk
-
Calibre 2.x is still in the Repos of OMV3, so if you don't need Calibre 3.x, you can install it easily with
to run Calibre server with user permissions, add a system user with a home dir, but without the right to login
Setup 2 shares in OMV web gui, gain rights/ALC to user calibre and to the users you want to give rights to add books (I set up "import" and "calibre", add SMB/NFS shares to provide books to calibre)
To start calibre with system.d create a file with nano: /etc/systemd/system/calibre.service containing this:
Code
Alles anzeigen[Unit] Description=Calibre Service After=network.target [Service] Type=forking User=calibre Group=users PIDFile=/var/run/calibre/calibre-server.pid PermissionsStartOnly=true ExecStartPre=-/bin/mkdir -p /var/run/calibre ExecStartPre=/bin/chown -R calibre:users /var/run/calibre ExecStart=/usr/bin/calibre-server \ --daemonize \ --username=calibre \ --port=9400 \ --pidfile=/var/run/calibre/calibre-server.pid \ --with-library=/srv/drive-by-xxx/calibre [Install] WantedBy=default.target
the subdirectory "calibre" in /var/run/ is needed for write-permissions to the PID-file. Adopt the library-path (--with-library=/srv/drive-by-xxx/calibre) and the port to your needs.
Start
Stop
Status
Install as serviceIn calibre home dir (/home/calibre/) create a script named "import.sh" with
Bash#!/bin/bash IFS=$'\n' /usr/bin/calibredb add -r --with-library=/srv/dev-disk-by-xxx/calibre/ /srv/dev-disk-by-xxx/import/ rm -R /srv/dev-disk-by-xxx/import/* echo "Import abgeschlossen!" | mailx -s "Import of your favourite ebooks done, Sir!" "your-email-address@xxx.xxx"
Adopt paths and email according to your needs.By copying books to the share "import" and running the script afterwards, books are imported to calibre database. Already present books will not be imported twice. You can create a Cron job to run this script every hour or so to check import folder for books an import them automaticly. (In Web-GUI: Planned Tasks -> Tonus 'daily', user 'root', command
To convert books into another format you can use and adopt this script:
Bash
Alles anzeigen#!/bin/bash IFS=$'\n' for file in `find /srv/dev-disk-by-xxx/calibre/ -type f -name "*.epub"` do if [ ! -f "${file%epub}mobi" ] then /usr/bin/ebook-convert "$file" "${file%epub}mobi" && chown calibre:users "${file%epub}mobi" idstring=`dirname "${file%epub}mobi"` idstring=${idstring%\)} /usr/bin/calibredb add_format --with-library=/srv/dev-disk-by-xxx/calibre/ ${idstring##*\(} "${file%epub}mobi" fi done
I store 2 formats EPUB + MOBI to serve Kindle and Tolino readers within my family. The script checks for all EPUBs and converts them to MOBI if not already a MOBI file is present. You an place this script in /home/calibre/ as well as conversion.sh and set up a Cron job to run it for example every 6 hours.
Don't forget to grant appropriate rights to the scripts and make them executable
This setup works for me like a charm. I don't use username + password for accessing calibre server since I do not forward the used port in router to public. (Some Kindle have also a problem with the user/password setup)
My family can access it by VPN (router-router-bonding) directly through their reader devices as installed shop.Feel free to hand in some improvements if there are any, I quite appreciate getting them!
-
-
I ported the calibre plugin to the latest OMV but found out that calibre 3.x has many different options. That killed my motivation to go any further.
-
That is sad to hear. The options mean server config options?
-
The options mean server config options?
Yep. The unit file is very different and I couldn't even get the server started because it said the database doesn't exist. I couldn't figure out how to create/initialize a new database.
-
-
Since Calibre version 2.50 is in Jesse repo and 2.75 is in Stretch repo, why not stick to verson 2.x for the plugin? This should cover OMV3+4, right? I know, OMV-Extras is a separate thing and can offer newer packages.
-
why not stick to verson 2.x for the plugin? This should cover OMV3+4, right?
That sounds like a nice idea but people complain enough as it is when the version used is just a few versions back. Plus, the calibre author recommends against it. I don't use calibre so I don't know what the best solution is. The plugin requires some re-writing whether I use calibre 3.x or use 2.x version from the Debian repos.
-
Debian Jesse is not bleeding edge ... in OMV, php is not bleeding edge, the kernel is not bleeding edge, a lot of services are not bleeding edge. Well, most users of OMV don't even notice that. For Calibre, where you see only server web gui, there is small difference in appearance.
If you look through calibres version 3.x changelogs, its basicly features und functions, minor bugfixing and security related update.
-
-
Debian Jesse is not bleeding edge ... in OMV, php is not bleeding edge, the kernel is not bleeding edge, a lot of services are not bleeding edge. Well, most users of OMV don't even notice that.
Plenty of people want bleeding edge kernels. People have asked for newer php but that isn't really possible. Most media related services/plugins (like plex, emby, couchpotato, sabnzbd, etc), people want the latest release.
If you look through calibres version 3.x changelogs, its basicly features und functions, minor bugfixing and security related update.
I get that but either way, it requires more work from me for something I don't use.
-
A small addition to my calibre howto:
To manage the database from remote, share the calibre-folder via Samba, be sure to set correct ACL and permissions for the accessing user for the directory and its subdirectories!
Stop your calibre server with
Install a 2.5.0 calibre on your remote computer (for Windows-machines there is a portable edition with this Version) and connect to your share by using the "change library" function. Now you can work on your library, correct import errors or edit metadata.If you encounter any errors relating read-only database, your permissions are not set correct.
use
to restart your server after changes were made to the metadata
-
Hi Riff-raff,
thank you very much for that tut.
I have understood everything so far.. except this one:
"Setup 2 shares in OMV web gui, gain rights/ALC to user calibre and to the users you want to give rights to add books (I set up "import" and "calibre", add SMB/NFS shares to provide books to calibre)"
Can you may give me an advice what I have to do exactly? (may in pictures?) I am mostly new on OMV 3.x and my english is good but I can´t follow it up on my german Web GUI...
Thanks a lot in advance
-
-
You need two shared folders, in my example 'calibre' (this is where calibre puts its database, the books and all meta data) and the 'import' folder. If you share 'import' with Samba, you can access this folder from your remote PC, copy new ebooks there and import them to the calibre database by using the provided script. Granting rights to these folders is done in the shared folter tab with Privileges and ACL. Privileges need to be set for calibre and the user you want to use to place books in the 'import' folder; read and write permissions should be granted.
The 'calibre' folder does not need to be shared with Samba since you access Calibre through webinterface or your prefered reading device. You could do it anyways, so you would be able to access the database from a remote calibre installation with GUI as well. In order to do that you would have to stop calibre service before you connect from remote. This is a little nasty, I would not recommed trying to do this.
The conversion script is designed to convert from EPUB to MOBI for the use on Kindle devices. You can replace all '.MOBI' within the script by your prefered ebook type to adopt your needs.Maybe I can set up a virtual machine and take some screenies during a setup to decorate this tutorial
/rudemode on
Auf Deutsch geht auch, aber nicht in diesem Thread, Sprachmix wird nicht gern gesehen.
/rudemode off -
Hi Riff Raff,
thanks for your reply
Got it and now I am hanging up on that:
the subdirectory "calibre" in /var/run/ is needed for write-permissions to the PID-file. Adopt the library-path (--with-library=/srv/drive-by-xxx/calibre) and the port to your needs.My calibre.service file is looking as yours but instead of xxx I have chosen the path of my "calibre" folder. What am I doing wrong here?
-
/srv/drive-by-id-ata-Hitachi_HDS723020BLA642_MN1240F33MV0LD-part1/calibre
Doesn't seem right, did you check it with ssh or terminal if present? Did you upgraded your installation to OMV3 from an existing OMV2?
mine looks like this (might be because of raid-use):
-
-
-
how does the conent of
look like?
Did you create the calibre user? Did you copy the startup script (service) correct?
My ownership of these two folders:
to see
Codedrwxrws---+ 22359 root users 913408 Jan 8 20:34 calibre drwxrws---+ 2 calibre users 4059136 Jul 28 00:55 calibre_import
with
to see
Code
Alles anzeigen# file: calibre # owner: root # group: users # flags: -s- user::rwx user:calibre:rwx user:MYNAME:rwx group::--- mask::rwx other::--- default:user::rwx default:user:calibre:rwx default:user:MYNAME:rwx default:group::--- default:mask::rwx default:other::---
What is that SSH-tool you use? Its more like an file explorer, right, nothing to push commands? I prefer SSH remote from Linux hosts and PuTTy from Windows hosts. -
Here the system.ctl status calibre.service
and here journal.ctl -xn
Please don't wonder about the 2 HDD which have no space left.. I try to fix this.
Hopefully this isn't the problem?!Regarding your questions how /serv looks like:
-
-
Check content of the following file:
Check if folderexists and contains the .pid-file. If there is a .pid, delete it. Check folder permissions as well. The folder should be created by the startscript and rights will be granted as well so that .pid-file can be placed.
-
Check content of the following file:
My file:[Unit]
<pre style="color: rgb(0, 0, 0); font-variant-ligatures: normal; orphans: 2; widows: 2; -webkit-user-select: text; position: absolute; top: -99px;">Description=Calibre ServiceAfter=network.target[Service]Type=forkingUser=calibreGroup=usersPIDFile=/var/run/calibre/calibre-server.pidPermissionsStartOnly=trueExecStartPre=-/bin/mkdir /var/run/calibreExecStartPre=/bin/chown -R calibre:users /var/run/calibreExecStart=/usr/bin/calibre-server \ --daemonize \ --username=calibre \ --port=9400 \ --pidfile=/var/run/calibre/calibre-server.pid \ --with-library=/srv/drive-by-id-ata-Hitachi_HDS723020BLA642_MN1240F33MV0LD-part1/calibre[Install] WantedBy=default.target
Check if folderexists and contains the .pid-file. If there is a .pid, delete it. Check folder permissions as well. The folder should be created by the startscript and rights will be granted as well so that .pid-file can be placed.
=> There is no PID File inside...
[/quote]
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!