Anyone know how to install Bazarr (companion to Sonarr/Radarr)

Hi,

Whats the output:

systemctl status rc.local

Thanks Tom.

The output:

osmc@osmc:~$ systemctl status rc.local
* rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor
  Drop-In: /usr/lib/systemd/system/rc-local.service.d
           `-debian.conf
   Active: active (running) since Wed 2021-01-13 11:26:39 CET; 1h 20min ago
     Docs: man:systemd-rc-local-generator(8)
  Process: 368 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
   Memory: 52.1M
   CGroup: /system.slice/rc-local.service
           |-1071 sudo python3 /opt/bazarr/bazarr.py
           |-1084 python3 /opt/bazarr/bazarr.py
           `-6456 /usr/bin/python3 -u /opt/bazarr/bazarr/main.py

Jan 13 12:46:30 osmc rc.local[368]: 2021-01-13 12:46:30,178 - root
Jan 13 12:46:34 osmc rc.local[368]: 2021-01-13 12:46:34,151 - root
Jan 13 12:46:40 osmc rc.local[368]: 2021-01-13 12:46:40,505 - root
Jan 13 12:46:40 osmc rc.local[368]: 2021-01-13 12:46:40,507 - root
Jan 13 12:46:44 osmc rc.local[368]: 2021-01-13 12:46:44,477 - root
Jan 13 12:46:50 osmc rc.local[368]: 2021-01-13 12:46:50,863 - root
Jan 13 12:46:50 osmc rc.local[368]: 2021-01-13 12:46:50,864 - root
Jan 13 12:46:54 osmc rc.local[368]: 2021-01-13 12:46:54,815 - root
Jan 13 12:47:01 osmc rc.local[368]: 2021-01-13 12:47:01,077 - root
Jan 13 12:47:01 osmc rc.local[368]: 2021-01-13 12:47:01,079 - root
lines 1-23/23 (END)

HI,

Ok rc.local.service looks ok. Please try changing this line:

sudo python3 /opt/bazarr/bazarr.py &

to:

/usr/bin/python3 /opt/bazarr/bazarr.py &

sudo isn’t required as rc.local is run as root and if in doubt full path helps.

Thanks Tom.

1 Like

It doesn’t seem to run. Logs: https://paste.osmc.tv/kikaromavi

Output from systemctl status rc.local

osmc@osmc:~$ systemctl status rc.local
* rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor
  Drop-In: /usr/lib/systemd/system/rc-local.service.d
           `-debian.conf
   Active: active (running) since Wed 2021-01-13 13:56:02 CET; 5min ago
     Docs: man:systemd-rc-local-generator(8)
  Process: 346 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
   Memory: 80.6M
   CGroup: /system.slice/rc-local.service
           |-1052 /usr/bin/python3 /opt/bazarr/bazarr.py
           |-1579 /usr/bin/python3 -u /opt/bazarr/bazarr/main.py
           `-1583 /usr/bin/python3 -m pip install --user -r /opt/bazarr/bazarr/.

Jan 13 14:01:12 osmc rc.local[346]: 2021-01-13 14:01:12,088 - root
Jan 13 14:01:19 osmc rc.local[346]: 2021-01-13 14:01:19,283 - root
Jan 13 14:01:19 osmc rc.local[346]: 2021-01-13 14:01:19,285 - root
Jan 13 14:01:23 osmc rc.local[346]: 2021-01-13 14:01:23,727 - root
Jan 13 14:01:30 osmc rc.local[346]: 2021-01-13 14:01:30,252 - root
Jan 13 14:01:30 osmc rc.local[346]: 2021-01-13 14:01:30,253 - root
Jan 13 14:01:34 osmc rc.local[346]: 2021-01-13 14:01:34,522 - root
Jan 13 14:01:41 osmc rc.local[346]: 2021-01-13 14:01:41,014 - root
Jan 13 14:01:41 osmc rc.local[346]: 2021-01-13 14:01:41,015 - root
Jan 13 14:01:45 osmc rc.local[346]: 2021-01-13 14:01:45,560 - root
lines 1-23/23 (END)

Hi,

I don’t think rc.local is the best approach, as I think /opt/bazarr/bazarr.py needs to be run as the osmc user, rather than root. I found this in the developers wiki:

I would try this for /etc/systemd/system/bazarr.service:

[Unit]
Description=Bazarr Daemon
After=network.target

# After=syslog.target network.target sonarr.service radarr.service

[Service]
WorkingDirectory=/opt/bazarr/
User=osmc
Group=osmc
UMask=0002
Restart=on-failure
RestartSec=5
Type=simple
ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py
KillSignal=SIGINT
TimeoutStopSec=20
SyslogIdentifier=bazarr
ExecStartPre=/bin/sleep 30

[Install]
WantedBy=multi-user.target

Thanks Tom.

2 Likes

Thanks Tom, that did the trick! Now everything is perfect!

1 Like

I’ve managed to install bazarr just fine, however in the requirements it states it needs FFMPEG to be installed and I’m running into errors that it can’t analyse any video file. A bit of googling told me that I do need to install FFMPEG using sudo apt-get install ffmpeg however I’m worried that that might bork up my osmc install since it already uses its own version of ffmpeg. Is it okay to install ffmpeg? Will having 2 versions of ffmpeg do anything with performance?