OMV: Adding an indexer to Radarr.

Leave a comment

July 21, 2017 by aubreykloppers

OpenMediaVault:

To install Radarr on OMV (as of this writing I am using 3.0.84) you will first have to install the “OMV-Extras” Plugin and enable it.  Then enable both the “OMV-Extras.org” and “OMV-Extras.org Testing” repos.  If you do not know what I am talking about at this stage, head over to the OMV discussion forum and read more.

Once you have Radarr installed (please see: Radarr Website) you will find that you only have a limited amount of indexers available for use.

Adding an indexer to Radarr:

The following steps will assist you to add your own custom indexer to Radarr.  NOTE: I found one broken library …

You can get the latest release info from Latest Jackett releases – (as of this writing 0.7.1588)

# apt-get install libcurl4-openssl-dev bzip2 mono-devel
# wget https://github.com/Jackett/Jackett/releases/download/v0.7.1588/Jackett.Binaries.Mono.tar.gz
# tar -xvf Jackett*
# mkdir /opt/jackett
# mv Jackett/* /opt/jackett/
# mono /opt/jackett/JackettConsole.exe

Now, if you get and error and find mono is not up to date:

 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys \
     3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
 echo "deb http://download.mono-project.com/repo/ubuntu trusty main" | \
     tee /etc/apt/sources.list.d/mono-official.list
 apt-get update
 apt-get install mono-devel
 mono /opt/jackett/JackettConsole.exe

You can now open the Jackett Web Interface with: http://%5BIP%5D/:9117

But, this is not all.  You are going to need some Startup Scripts and some Services Scripts.  Kill the mono command you ran and create the 2 scripts:

  • Service upstart script: /etc/init/jackett.conf
  • Startup script: /etc/init.d/jackett

Once the 2 scripts have been created, you will also need to make the scripts executable and available:

  • chmod 777 /etc/init.d/jackett
  • update-rc.d jackett defaults
  • service jackett start

Service upstart script: (vi /etc/init/jackett.conf)

#Jackett startup script

env DIR=/opt/jackett
setuid root
setgid nogroup

start on runlevel [2345]

stop on runlevel [016]

#respawn

exec mono $DIR/JackettConsole.exe

Startup script: (vi /etc/init.d/jackett)

#! /bin/sh
### BEGIN INIT INFO
# Provides: Jackett
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Should-Start: $NetworkManager
# Should-Stop: $NetworkManager
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts instance of Jackett
# Description: starts instance of Jackett using start-stop-daemon
### END INIT INFO

############### EDIT ME ##################
# path to app
APP_PATH=/opt/jackett

# user
RUN_AS=root

# path to mono bin
DAEMON=$(which mono)

“/etc/init.d/jackett” 121 lines, 2516 characters
#! /bin/sh
### BEGIN INIT INFO
# Provides: Jackett
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Should-Start: $NetworkManager
# Should-Stop: $NetworkManager
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts instance of Jackett
# Description: starts instance of Jackett using start-stop-daemon
### END INIT INFO

############### EDIT ME ##################
# path to app
APP_PATH=/opt/jackett

# user
RUN_AS=root

# path to mono bin
DAEMON=$(which mono)

# Path to store PID file
PID_FILE=/var/run/jackett/jackett.pid
PID_PATH=$(dirname $PID_FILE)

# script name
NAME=jackett

# app name
DESC=Jackett

# startup args
EXENAME=”JackettConsole.exe”
DAEMON_OPTS=” “$EXENAME

############### END EDIT ME ##################

JACKETT_PID=`ps auxf | grep $EXENAME | grep -v grep | awk ‘{print $2}’`

test -x $DAEMON || exit 0

set -e

#Look for PID and create if doesn’t exist
if [ ! -d $PID_PATH ]; then
mkdir -p $PID_PATH
chown $RUN_AS $PID_PATH
fi

if [ ! -d $DATA_DIR ]; then
mkdir -p $DATA_DIR
chown $RUN_AS $DATA_DIR
fi

if [ -e $PID_FILE ]; then
PID=`cat $PID_FILE`
if ! kill -0 $PID > /dev/null 2>&1; then
echo “Removing stale $PID_FILE”
rm $PID_FILE
fi
fi

echo $JACKETT_PID > $PID_FILE

case “$1” in
start)
if [ -z “${JACKETT_PID}” ]; then
echo “Starting $DESC”
rm -rf $PID_PATH || return 1
install -d –mode=0755 -o $RUN_AS $PID_PATH || return 1
start-stop-daemon -d $APP_PATH -c $RUN_AS –start –background –pidfile $PID_FILE –exec $DAEMON — $DAEMON_OPTS
else
echo “Jackett already running.”
fi
;;
stop)
echo “Stopping $DESC”
echo $JACKETT_PID > $PID_FILE
start-stop-daemon –stop –pidfile $PID_FILE –retry 15
;;

restart|force-reload)
echo “Restarting $DESC”
start-stop-daemon –stop –pidfile $PID_FILE –retry 15
start-stop-daemon -d $APP_PATH -c $RUN_AS –start –background –pidfile $PID_FILE –exec $DAEMON — $DAEMON_OPTS
;;
status)
# Use LSB function library if it exists
if [ -f /lib/lsb/init-functions ]; then
. /lib/lsb/init-functions
if [ -e $PID_FILE ]; then
status_of_proc -p $PID_FILE “$DAEMON” “$NAME” && exit 0 || exit $?
else
log_daemon_msg “$NAME is not running”
exit 3
fi

else
# Use basic functions
if [ -e $PID_FILE ]; then
PID=`cat $PID_FILE`
if kill -0 $PID > /dev/null 2>&1; then
echo ” * $NAME is running”
exit 0
fi
else
echo ” * $NAME is not running”
exit 3
fi
fi
;;
*)
N=/etc/init.d/$NAME
echo “Usage: $N {start|stop|restart|force-reload|status}” >&2
exit 1
;;
esac

exit 0

See MORE HERE: https://www.htpcguides.com/install-jackett-on-ubuntu-14-x-for-custom-torrents-in-sonarr/

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: