Install Comicstreamer Ubuntu 18.04

Install the ComicStreamer dependencies, it uses python and some image processing utilities

sudo apt-get update sudo apt-get install git python-pip python-tornado python-dev python-dateutil libavahi-compat-libdnssd-dev git libtiff*-dev libjpeg-dev zlib1g-dev libfreetype6-dev libwebp-dev build-essential unzip -y #i onlty used: sudo apt-get install libavahi-compat-libdnssd-dev libjpeg-dev

This command clones the latest ComicStreamer into the /opt/comicstreamer location. It is a fork which supports ComicStreamer behind a reverse proxy and has some additional fixes not in the original ComicStreamer.

sudo git clone /opt/comicstreamer

Change ownership of ComicStreamer folder to prevent permission issues, replace htpcguides with your username and its group which are almost always the same

sudo chown -R username:username /opt/comicstreamer

Enter the ComicStreamer folder to install the python dependencies and build unrar

cd /opt/comicstreamer

Install the pip packages using the requirements file

sudo pip install -r requirements.txt

Install pybonjour

pip install

Run the paver command to compile unrar and the library

paver libunrar

Test if ComicStreamer runs

python /opt/comicstreamer/comicstreamer

ComicStreamer run on port 32500 so you can go check if it is working by going to a browser and entering http://ip.address:32500.

In the SSH terminal window hit Ctr+C to terminate Comicstreamer for now

decoder jpeg not available

Uninstall and reinstall Pillow if you receive the error “decoder jpeg not available” when processing comics

pup uninstall Pillow pip install Pillow

Autostart ComicStreamer init.d Script

Let’s make ComicStreamer start on boot with an init.d script adapted from here

sudo nano /etc/init.d/comicstreamer

Paste the ComicStreamer init.d script, replace htpcguides with the user you normall use and which owns the /opt/comicstreamer directory

#!/bin/sh ### BEGIN INIT INFO # Provides: ComicStreamer # Required-Start: $local_fs $remote_fs $network # Required-Stop: $local_fs $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: ComicStreamer # Description: ComicStreamer shows your cbr and cbz files ### END INIT INFO # Documentation available at # # Debian provides some extra functions though . /lib/lsb/init-functions DAEMON_NAME="ComicStreamer" DAEMON_USER="htpcguides" DAEMON_PATH="/usr/bin/python" DAEMON_OPTS="/opt/comicstreamer/comicstreamer" DAEMON_PWD="/opt/comicstreamer" DAEMON_DESC=$(get_lsb_header_val $0 "Short-Description") DAEMON_PID="/opt/comicstreamer/${DAEMON_NAME}.pid" DAEMON_NICE=0 DAEMON_LOG='/var/log/comicstreamer.log' [ -r "/etc/default/${DAEMON_NAME}" ] && . "/etc/default/${DAEMON_NAME}" do_start() { local result pidofproc -p "${DAEMON_PID}" "${DAEMON_PATH}" > /dev/null if [ $? -eq 0 ]; then log_warning_msg "${DAEMON_NAME} is already started" result=0 else log_daemon_msg "Starting ${DAEMON_DESC}" "${DAEMON_NAME}" touch "${DAEMON_LOG}" chown $DAEMON_USER "${DAEMON_LOG}" chmod u+rw "${DAEMON_LOG}" if [ -z "${DAEMON_USER}" ]; then start-stop-daemon --start --quiet --oknodo --background \ --nicelevel $DAEMON_NICE \ --chdir "${DAEMON_PWD}" \ --pidfile "${DAEMON_PID}" --make-pidfile \ --exec "${DAEMON_PATH}" -- $DAEMON_OPTS result=$? else start-stop-daemon --start --quiet --oknodo --background \ --nicelevel $DAEMON_NICE \ --chdir "${DAEMON_PWD}" \ --pidfile "${DAEMON_PID}" --make-pidfile \ --chuid "${DAEMON_USER}" \ --exec "${DAEMON_PATH}" -- $DAEMON_OPTS result=$? fi log_end_msg $result fi return $result } do_stop() { local result pidofproc -p "${DAEMON_PID}" "${DAEMON_PATH}" > /dev/null if [ $? -ne 0 ]; then log_warning_msg "${DAEMON_NAME} is not started" result=0 else log_daemon_msg "Stopping ${DAEMON_DESC}" "${DAEMON_NAME}" killproc -p "${DAEMON_PID}" "${DAEMON_PATH}" result=$? log_end_msg $result rm "${DAEMON_PID}" fi return $result } do_restart() { local result do_stop result=$? if [ $result = 0 ]; then do_start result=$? fi return $result } do_status() { local result status_of_proc -p "${DAEMON_PID}" "${DAEMON_PATH}" "${DAEMON_NAME}" result=$? return $result } do_usage() { echo $"Usage: $0 {start | stop | restart | status}" exit 1 } case "$1" in start) do_start; exit $? ;; stop) do_stop; exit $? ;; restart) do_restart; exit $? ;; status) do_status; exit $? ;; *) do_usage; exit 1 ;; esac

Make the ComicStreamer init.d script executable

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

Update the system to run ComicStreamer on boot

sudo update-rc.d comicstreamer defaults

Start the Comicstreamer service

sudo service comicstreamer start

Leave a Reply

Your email address will not be published. Required fields are marked *