-
-
Notifications
You must be signed in to change notification settings - Fork 60
Installation on Linux
Timo edited this page Jul 2, 2022
·
9 revisions
Disclaimer: I copied most of this tutorial from Bazarr. So all credits for this guide go to the creator/developer of Bazarr.
- (Ubuntu/Debian) Install GIT with
apt-get install git-core python3-pip - (Fedora/CentOS) Install GIT with
yum install git python3-pip - (Raspbian and maybe other ARM based distro) Install python3-dev with
apt-get install libxml2-dev libxslt1-dev python3-libxml2 python3-lxml unrar-free - Upgrade Python to version 3.6 or greater.
-
cdto the folder of your choosing. - Run
git clone https://github.com/Waterboy1602/Addarr.git. - Install Python requirements using
pip install -r requirements.txt.- (Raspbian) It can happen that
pipdoens't work. If so, trypip 3instead. - (Raspbian) Don't worry about
lxmlnot being installed at this step, you have installed the module throughapt-getanyway.
- (Raspbian) It can happen that
- You can now start Addarr via
python addarr.py
Ifpython addarr.pydoesn't work, try starting it withpython3 addarr.py.
There are two possible ways to achieve this. You could use systemd or upstart.
This is a systemd service file created by users in a guide of Bazarr. It assumes you've installed Addarr in /opt/addarr.
You have to create a addarr.service file in /etc/systemd/system that would contain the following text:
[Unit]
Description=Addarr Daemon
After=syslog.target network.target
[Service]
WorkingDirectory=/opt/addarr/
User=your_user(username of your choice)
Group=your_group(group of your choice)
UMask=0002
Restart=on-failure
RestartSec=5
Type=simple
ExecStart=/usr/bin/python /opt/addarr/src/addarr.py
KillSignal=SIGINT
TimeoutStopSec=20
SyslogIdentifier=addarr
ExecStartPre=/bin/sleep 30
[Install]
WantedBy=multi-user.target
Then you need to enable the service using sudo systemctl enable addarr
This is an init upstart file. It assumes you've installed Addarr in /opt/addarr
You have to create an addarr.conf file in /etc/init/. sudo nano /etc/init/addarr.conf The file would contain the following text:
description "Upstart Script to run Addarr as a service on Ubuntu/Debian based systems, as well as others"
author "A Addarr User"
#Set user and group for the process if desired
#setuid myUserID
#setgid myGroupID
#start after all services come up
start on runlevel [2345]
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Make sure script is started with system locale
script
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG
fi
exec python /opt/addarr/src/addarr.py
end script