User:Simon/bootleglibrary/tools

From XPUB & Lens-Based wiki

Setting up a calibre-web content server on an RPi

From a pad session:

bootleg library: http://145.24.131.15:20190/
Username: guest
Password: thelibraryisopen


Setting up a headless Calibre server
http://linuxphilia.blogspot.com/2012/06/my-wife-and-i-like-to-read-books-on-go.html

Turning raspbeery pi to ebook server:
https://opensource.com/article/17/6/raspberrypi-ebook-server

ctl + z to suspend a session in terminal, fg to rejoin 

usbmount: automatically mounts USB mass storage devices (typically USB pens) when they are plugged in, and unmounts them when they are removed. 
but it didn't work ;(

https://www.raspberrypi-spy.co.uk/2014/05/how-to-mount-a-usb-flash-disk-on-the-raspberry-pi/

init.d and service files
generating a /etc/init.d/calibre file, and paste bash script from line 6 to file. 

what is init.d?
read on:

    https://bash.cyberciti.biz/guide//etc/init.d

    https://www.ghacks.net/2009/04/04/get-to-know-linux-the-etcinitd-directory/

    https://askubuntu.com/questions/5039/what-is-the-difference-between-etc-init-and-etc-init-d

    https://unix.stackexchange.com/questions/20357/how-can-i-make-a-script-in-etc-init-d-start-at-boot

    http://linux-tutorial.info/modules.php?name=ManPage&sec=7&manpage=init.d


what is daemon?

    http://man7.org/linux/man-pages/man3/daemon.3.html


https://askubuntu.com/questions/666423/run-script-at-startup-in-etc-init-d#666480

sudo chmod +x /etc/init.d/calibre

sudo update-rc.d calibre defaults


other than init.d there is systemd, which is supposed to be faster 

sudo nano /etc/systemd/system/calibre.service

[Unit]
Description=Calibre.
After=syslog.target network.target

[Service]
Type=simple
User=pi
Group=pi
WorkingDirectory=/home/pi
ExecStart=/usr/bin/nodejs /opt/etherpad/node_modules/ep_etherpad-lite/node/server.js
Restart=always

[Install]
WantedBy=multi-user.target

sudo service ~insert program

installed calibre web!

also check out

    http://internet-in-a-box.org/

    https://github.com/janeczku/calibre-web