E-Book Bibliothek

1) Installation

1.1) Client

Installation erfolgt in /opt/calibre

sudo -v && wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main(install_dir='/opt')"

1.2) Server

Vieles Infos hier auf https://www.digitalocean.com/ aber ich empfehle aktuell den OPDS Server zu verwenden.

2) Aktuelle Fehler

3) Konfiguration

3.1) Start/Stop Script

#!/bin/bash

cd /home/user/calibre

if [ "$1" == "start" ]; then
               echo "Start Calibre-Server..."
               /home/user/calibre/calibre-server --pidfile=/home/user/var/calibre.pid --daemonize --url-prefix=/library
       elif [ "$1" == "stop" ]; then
               echo "Stop Calibre-Server..."
               kill -INT $(cat /home/user/var/calibre.pid)
               wait
               pkill -9 -U user  calibre-server
               wait
       elif [ "$1" == "restart" ]; then
               echo "Restarting Calibre-Server..."
               /home/user/bin/calibre-standalone stop
               wait
               /home/user/bin/calibre-standalone start
       else
               echo "Use calibre-standalone stop|start"

fi

3.2) Crontab

@hourly python2.6 /home/user/bin/checkmem.py calibre-server 128000 /home/user/bin/calibre-restart >> /home/user/var/logs/crontab.log 2>&1

@reboot /home/user/bin/calibre-restart

3.3) Sync library from local to server

#!/bin/bash
rsync -q -rtze ssh /home/user/Calibre-Bibliothek/ user@heavy.ch:/home/user/bibliothek/

ssh user@heavy.ch "/home/user/bin/calibre-restart"