zfs create ship/book cd /mnt/ship/book git clone https://github.com/janeczku/calibre-web.git # data/calibre is the dataset of calibre libraries # ship/book is the dataset for calibre-web databases
export JAIL=book export JAILHOSTNAME=book export JAILDOMAIN=ahlawat.com export JAILIP=57 export JAILUSER=X export JAILUSERID=1000 export JAILUSERVNC=false /root/FreeBSD/jails/create.sh $JAIL $JAILHOSTNAME $JAILDOMAIN $JAILIP $JAILUSER $JAILUSERID $JAILUSERVNC iocage exec $JAIL "mkdir /data" iocage fstab -a $JAIL /mnt/ship/$JAIL /data nullfs rw 0 0 iocage exec $JAIL "mkdir /mnt/books" iocage fstab -a $JAIL /mnt/data/calibre /mnt/books nullfs rw 0 0 iocage fstab -l $JAIL iocage exec $JAIL "pkg install -y py39-pip py39-sqlite3 py39-ldap rust libxml2 libxslt" iocage exec $JAIL "pip install calibreweb flask-simpleldap" iocage exec $JAIL "mkdir -p /usr/local/etc/rc.d" iocage exec $JAIL "cp /mnt/config/cps /usr/local/etc/rc.d" iocage exec $JAIL "chmod 555 /usr/local/etc/rc.d/cps" iocage exec $JAIL "sysrc cpsserver_enable=YES" iocage exec $JAIL "service cps start"
To add a new library instance:
binding only to tcp6 [root@book ~]# netstat -an Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp6 0 0 *.444 *.* LISTEN tcp6 0 0 *.445 *.* LISTEN tcp6 0 0 *.443 *.* LISTEN tcp4 0 0 *.22 *.* LISTEN tcp6 0 0 *.22 *.* LISTEN Active UNIX domain sockets Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr fffff80044c2fe10 dgram 0 0 0 fffff80034e652d0 0 fffff80044c2f870 fffff80044c2f870 dgram 0 0 0 fffff80034e652d0 0 0 fffff80034e652d0 dgram 0 0 fffff80d81be8760 0 fffff80044c2fe10 0 /var/run/logpriv fffff80034e653c0 dgram 0 0 fffff80d81be8938 0 0 0 /var/run/log [root@book ~]# edited - [root@book /data/calibre-web/cps]# nano -w server.py OLD def start_gevent(self): try: ssl_args = dict() if web.ub.config.get_config_certfile() and web.ub.config.get_config_keyfile(): ssl_args = {"certfile": web.ub.config.get_config_certfile(), "keyfile": web.ub.config.get_config_keyfile()} # if os.name == 'nt': self.wsgiserver= WSGIServer(('0.0.0.0', web.ub.config.config_port), web.app, spawn=Pool(), **ssl_args) # else: # self.wsgiserver = WSGIServer(('', web.ub.config.config_port), web.app, spawn=Pool(), **ssl_args) self.wsgiserver.serve_forever()