Skip to content

Instantly share code, notes, and snippets.

@Derkades
Created February 2, 2019 16:31
Show Gist options
  • Save Derkades/7c7873ecc2f35d1364aec5a59d8f1438 to your computer and use it in GitHub Desktop.
Save Derkades/7c7873ecc2f35d1364aec5a59d8f1438 to your computer and use it in GitHub Desktop.
Bazarr FreeBSD installation instructions

Disclaimer: I don't know how rc.d works so the script is pretty crappy and doesn't have start/stop/status functionality. It only starts the program on startup, which was enough for me.

Installing Bazarr on FreeBSD

  • Install the required software pkg update && pkg install git python27 py27-pip py27-libxml2 py27-libxslt py27-sqlite3
  • cd /usr/local
  • Clone the repository using git clone https://github.com/morpheus65535/bazarr.git (this will download the files to /usr/local/bazarr)
  • cd bazarr
  • Install Python requirements using pip install -r requirements.txt
  • Check if it works python2.7 bazarr.py. You should see BAZARR is started and waiting for request on http://0.0.0.0:6767/

Starting on boot

  • nano /usr/local/etc/rc.d/bazarr
  • Enter this:
#!/bin/sh

#
# PROVIDE: bazarr
# REQUIRE: networking
# KEYWORD:

. /etc/rc.subr

name="bazarr"
rcvar="bazarr_enable"
command="/usr/local/bin/python2.7 /usr/local/bazarr/bazarr.py"
bazarr_user=root

start_cmd="bazarr_start"

bazarr_start(){
        /usr/sbin/daemon -r -f -u $bazarr_user $command
}

load_rc_config $name
: ${bazarr_enable:=no}

run_rc_command "$1"
  • Save and exit (ctrl+x -> y -> enter)
  • Make the file executable chmod +x /usr/local/etc/rc.d/bazarr
  • nano /etc/rc.conf
  • On the last line, add bazarr_enable="YES"
  • Reboot
@morpheus65535
Copy link

Thanks I'll add this to the wiki!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment