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.
- 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 seeBAZARR is started and waiting for request on http://0.0.0.0:6767/
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
Thanks I'll add this to the wiki!