LOCAST2PLEX help please

oumpa31

Patron
Joined
Apr 7, 2015
Messages
253
With Football starting and my antenna not always being reliable I started looking into Locast. (local channel steaming service for $5 a month). Well i came across Locast2Plex that would let me add it to Plex. Locast2plex is a prebuilt Docker image that I'm not sure how to set up in FreeNAS. I came across a post on Reddit with the person saying they got it running in a jail. If anyone has set this up. I would love some help and or directions on how to accomplish this.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
Did you try to follow the instructions provided here:

Seems fairly clear.

Is it the docker part (which sets up Locast to act like a HDHomerun) which you're uncertain with? The simplest option is to install an Ubuntu VM on FreeNAS and then put docker on it... the instructions are clear in steps 1-3 if you have that. Then steps 4 & 5 are pretty simple in Plex.
 

oumpa31

Patron
Joined
Apr 7, 2015
Messages
253
That is what i wasn't sure of. I do have a Ubuntu VM on my FreeNAS. I use it for my Unifi Controler so i'll try to get this up and running today. Is there a Docker program you would recommend.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
Last edited:

oumpa31

Patron
Joined
Apr 7, 2015
Messages
253
After failing with 4.2 time and time again i had to go to 5.2 and had change even more things. But i finally got it working as long as i keep the shell window open. If i exit out of the shell window it stops running. I’m sure something has to be edited in the rc.d file to run all the time but not sure what. Here are all the steps i had to go through for 5.2

  1. Log in as Root or “sudo” will be needed

  2. Create Jail locast2plex
Basejail - yes
VNET – yes
Berkeley Packet Filter – yes
IPv4 Interface – vnet0
IPv4 Address – jail ip
IPv4 Netmask – 24 (normal also known as 255.255.255.0)
IPv4 Default Router – router ip
Auto-Start – yes

2a. Start Jail

  1. Go to Shell and input
    3a. If Root user: iocage console locast2plex if not Root user: sudo iocage console locast2plex
    3b. Update repository pkg update && upgrade
    3b. Install dependencies: pkg install python2 ffmpeg wget
    3c. Create a no-login user to run the service: pw adduser -m -u 6077 -n locast -w no (-m creates the home directory)
    3d. Go to your target installation directory: cd /home/locast
    3e. Download the file as the locast user: su -m locast -c “wget https://github.com/tgorgdotcom/locast2plex/archive/0.5.2.tar.gz
    3f. Extract the file as the locast user: su -m locast -c “tar -xf 0.5.2.tar.gz”
Still inside the jail

Create a service file in the following directory: mkdir -p /usr/local/etc/rc.d

Lets call the service locast2plex, so we create the file like: ee /usr/local/etc/rc.d/locast2plex

Then copy and paste the following into your service file:
_____________________________________________________________________________
#!/bin/sh

. /etc/rc.subr

name=locast2plex
rcvar=locast2plex_enable

start_cmd="${name}_start"
stop_cmd=":"

load_rc_config name: {locast2plex_enable:=no}

locast2plex_start()

{
su -m locast -c “/usr/local/bin/python2 /home/locast/locast2plex-0.5.2/main.py”
}

run_rc_command “$1”
___________________________________________________________________________________
make your service file executable: chmod +x /usr/local/etc/rc.d/locast2plex

SSH into the box go to enable your service in “/iocage/locast2plex/root/etc/rc.conf” by appending the file with the lines

# Enable locast2plex
locast2plex_enable="YES"

also go into “/iocage/locast2plex/root/home/locast/locast2plex-0.5.2" and create config.ini

The file should look like this:

[main]
locast_username=username
locast_password=password
plex_accessible_ip=jail ip

and save

and finally start your service with: service locast2plex start
 
Top