sabnzbd / sickbeard / couchpotato pbi's

Status
Not open for further replies.

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I'll take a look tomorrow evening and see what I can do. It looks like the Serviio plugin won't be that difficult, more about that later.



Did something happen that made you say this? Technically the jail is isolated from FreeNAS and shouldn't cause any problems unless there's a bug, but it is possible to mess up the jail if the plugin doesn't work right.

There's definitely some error checking that needs to be done in the GUI. I should try and open some tickets before the release or there's going to be some confusion and mistakes when people try to install plugins.

I'm wonder what artifacts may be left behind if a jail is deleted improperly. Anyway, it's getting late for me.

Thanks for your effort to figure this out and post the details, nice work.

yeah, my pbi's don't have any of the gui stuff yet so they may cause some problems with nginx, the worst I've had to do was reboot FreeNAS ('service nginx restart' didn't seem to work)

you should be safe but this warning was to cover my own but
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
v0.3

SOURCE
http://eto.homeip.net/usenet-0.3.tar.gz
PBI's (still need you to edit /etc/rc.conf and start services)
http://eto.homeip.net/usenet-0.3-pbi.tar.gz

CHANGES
-each program creates it's own user and by default is run by this user (not root)
-programs are killed and users are deleted when program is uninstalled
-'service PROGRAM status' is now working

WHAT NEEDS TO BE DONE BEFORE RELEASE
(need help with this, too busy to try till this weekend, also I'm not really a javascript guy)
-start/stop from gui 'resources/control'
-mounting 'resources/mp_edit.html'
-enable/disable from gui 'resources/edit.html' (would edit /etc/rc.conf)
 

Dave2802

Dabbler
Joined
Mar 12, 2012
Messages
14
Just quickly tested the above pbi's, on starting the following services

sabnzbd said "The Python module Cheetah is required"
sickbeard said "ImportError: No module named _sqlite3"
couchpotato said "ImportError: No module named pysqlite2"
headphones said "ImportError: No module named _sqlite3"

I could be doing something wrong but I just thought I'd post my results.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Just quickly tested the above pbi's, on starting the following services

sabnzbd said "The Python module Cheetah is required"
sickbeard said "ImportError: No module named _sqlite3"
couchpotato said "ImportError: No module named pysqlite2"
headphones said "ImportError: No module named _sqlite3"

I could be doing something wrong but I just thought I'd post my results.

thanks for testing, hopefully we can iron out these bugs.

*are you on 32 or 64 bit?
*you might want to check /usr/local/lib/python2.7/site-packages and make sure the folder Cheetah exits
*inside should be simlinks to a bunch of stuff in /usr/pbi/PROGRAM/lib/python2.7/site-packages/Cheetah

if not the simlinking run by 'install-pathlinks.sh' didn't work. If they are there then your python path isn't right somehow.
 

Dave2802

Dabbler
Joined
Mar 12, 2012
Messages
14
Yes I'm on x64, just checked this location /usr/local/lib/python2.7/site-packages/ and the cheetah folder exists but is completely empty. If the simlinking has not run/didn't work is this something I missed or something I can correct ?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I doubt you missed anything, this should just run and do everything from the gui.
you could correct this but lets try and get this program fixed so others wont have to deal with fixes as well.

can you check if '/usr/pbi/sabnzbd-amd64/.sbin/install-pathlinks.sh' exists.
if it does can you try running it, then see if services start. thanks
 

Dave2802

Dabbler
Joined
Mar 12, 2012
Messages
14
Ok I found '/usr/pbi/sabnzbd-amd64/.sbin/install-pathlinks.sh' which is there, I've run that which returned the line 'ln: /usr/local/etc/rc.d/sabnzbd: File exists'
I've then tried to start the sabnzbd service which gave the same error of 'The Python module Cheetah is required' and i've checked the folder '/usr/local/lib/python2.7/site-packages/Cheetah' which is still empty so it looks like the install-pathlinks.sh isn't working as it should I take it. Thanks
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
open the 'install-pathlinks.sh' file, it should be very very long, it should simlink like 100+ things not just the rc.d file
If the file only has a few commands it is the 0.2 version, if it is very long it is the 0.3 version.

Which verison of the plugins are you running? (v0.3 is the latest)
pbi_info should give this.

Thanks again for debugging
 

Dave2802

Dabbler
Joined
Mar 12, 2012
Messages
14
Just looked at the code from the install-pathlinks.sh and your right its very very very long.

just realised that now
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I'm running v0.3

Hmm, weird. Wonder why your post 'install-pathlinks.sh' isn't working then. I'll test my pbi's with a fresh jail, it may be permission issues on the folders it's trying to simlink to/from.
If you want you can try running some of the simlink commands from the command line, but really as root you should be able to successfully run 'install-pathlinks.sh'

wow, that seems weird. Maybe delete the plugins (same way you installed them, so probably from the gui)
and try installing these instead. http://eto.homeip.net/usenet-0.4-pbi.tar.gz
(They're not fully done but should work, others can test as well)
 

Dave2802

Dabbler
Joined
Mar 12, 2012
Messages
14
Here you go

** Start **

if [ -z "$SYS_LOCALBASE" ]; then SYS_LOCALBASE="/usr/local" ; fi
_bd="`dirname $SYS_LOCALBASE/etc/rc.d/sabnzbd`"
if [ ! -d "$_bd" ] ; then
mkdir -p "${_bd}"
fi
ln -s /usr/pbi/sabnzbd-amd64/etc/rc.d/sabnzbd $SYS_LOCALBASE/etc/rc.d/sabnzbd

_bd="`dirname $SYS_LOCALBASE/bin/`"
if [ ! -d "$_bd" ] ; then
mkdir -p "${_bd}"
fi
ln -fs /usr/pbi/sabnzbd-amd64/bin/cheetah $SYS_LOCALBASE/bin/

_bd="`dirname $SYS_LOCALBASE/bin/cheetah-analyze`"
if [ ! -d "$_bd" ] ; then
mkdir -p "${_bd}"
fi
ln -fs /usr/pbi/sabnzbd-amd64/bin/cheetah-analyze $SYS_LOCALBASE/bin/cheetah-analyze

_bd="`dirname $SYS_LOCALBASE/bin/cheetah-compile`"
if [ ! -d "$_bd" ] ; then
mkdir -p "${_bd}"
fi
ln -fs /usr/pbi/sabnzbd-amd64/bin/cheetah-compile $SYS_LOCALBASE/bin/cheetah-compile

_bd="`dirname $SYS_LOCALBASE/bin/funzip`"
if [ ! -d "$_bd" ] ; then
mkdir -p "${_bd}"
fi
ln -fs /usr/pbi/sabnzbd-amd64/bin/funzip $SYS_LOCALBASE/bin/funzip

_bd="`dirname $SYS_LOCALBASE/bin/par2`"
if [ ! -d "$_bd" ] ; then
mkdir -p "${_bd}"
fi
ln -fs /usr/pbi/sabnzbd-amd64/bin/par2 $SYS_LOCALBASE/bin/par2

_bd="`dirname $SYS_LOCALBASE/bin/par2create`"
if [ ! -d "$_bd" ] ; then
mkdir -p "${_bd}"
fi
ln -fs /usr/pbi/sabnzbd-amd64/bin/par2create $SYS_LOCALBASE/bin/par2create

_bd="`dirname $SYS_LOCALBASE/bin/par2repair`"
if [ ! -d "$_bd" ] ; then
mkdir -p "${_bd}"
fi
ln -fs /usr/pbi/sabnzbd-amd64/bin/par2repair $SYS_LOCALBASE/bin/par2repair

_bd="`dirname $SYS_LOCALBASE/bin/par2verify`"
if [ ! -d "$_bd" ] ; then
mkdir -p "${_bd}"
fi
ln -fs /usr/pbi/sabnzbd-amd64/bin/par2verify $SYS_LOCALBASE/bin/par2verify

** End **
 

Dave2802

Dabbler
Joined
Mar 12, 2012
Messages
14
just checking my permissions, when I'm in the Jail as root I cannot create any files in the /mnt/tank/ area, it says its a read-only file system. I can write everywhere else, just not in the jail tank area.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
maybe $SYS_LOCALBASE isn't set right for some reason. you could try editing the script and echoing $SYS_LOCALBASE just to make sure it's correctly set to /usr/local.

anyway good luck, gotta go eat and pass a final. probably be back in 6 hours to look at this again
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Good luck on the final.

I'm just starting to take a look, is there a preferred sequence to install each of the PBI's?

I'll give them a try, but I'm sure that question will come up.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
thanks for testing, hopefully we can iron out these bugs.

*are you on 32 or 64 bit?
*you might want to check /usr/local/lib/python2.7/site-packages and make sure the folder Cheetah exits
*inside should be simlinks to a bunch of stuff in /usr/pbi/PROGRAM/lib/python2.7/site-packages/Cheetah

if not the simlinking run by 'install-pathlinks.sh' didn't work. If they are there then your python path isn't right somehow.

I just installed all four PBI's (x64), I looked in /usr/local/lib/python2.7/site-packages/Cheetah and it is full of symlinks (owned by root:wheel)

So at least that part seems to have worked ok for me.

I haven't used any of this stuff before, so I'm not familiar with how any of these apps are supposed to work. Even though I'm not a javascript guy either, I can probably figure it out. I'll start looking at that after I try and start the apps from the command line.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
just checking my permissions, when I'm in the Jail as root I cannot create any files in the /mnt/tank/ area, it says its a read-only file system. I can write everywhere else, just not in the jail tank area.

Dave, this is normally how a jail works. If you mount an external filessystem using mount_nullfs inside the jail, then you can read/write to it. You also need an fstab."jail-name" outside the jail.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Josh,

It looks like the tweak-rcconf is in the wrong directory, it needs to be in resources. I'm seeing it in the top level folder for each "module". so for example couchpotato: /usr/pbi/couchpotato-amd64/tweak-rcconf should be in /usr/pbi/couchpotato-amd64/resources/tweak-rcconf

See if that helps.

EDIT: I guess this might be where the PBI puts it after you run the pbi_makeport....

EDIT-2:

Ok, think I've got the rc.conf thing. Here's the couchpotato tweak-rcconf:

Code:
#!/bin/sh
couchpotato_path=/usr/pbi/couchpotato-$(uname -m)
tmpfile=$(mktemp /tmp/.******)
grep -v 'couchpotato_' /etc/rc.conf > ${tmpfile}
cat ${couchpotato_path}/etc/rc.conf >> ${tmpfile}
mv ${tmpfile} /etc/rc.conf


If you look at this line "cat ${couchpotato_path}/etc/rc.conf >> ${tmpfile}" you'll notice it's trying to cat an rc.conf file in /usr/pbi/couchpotato/etc, but there is no rc.conf file there. If there was I suspect it would have "couchpotato_enable="YES" which would then be appended to the master rc.conf in /etc
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Ok, I'm looking at the Couchpotato config file and there are a ridiculous number of options. How do people normally configure these, is there a GUI/web interface they use or are people used to editing this by hand?

I can try and start the html/javascript for the FreeNAS GUI on Couchpotato, but it probably wouldn't hurt if someone else wants to work on one of the others.

(Unless there's already some type of web interface built into CP)


EDIT: OK, I figured that out, there's nice web interface already. That makes things easier.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
if you look at the source for the firefly pbi I did the tweak-rcconf right. basically it's just a script but it isn't run until after you enable the services in the gui. (that's at least how firefly seemed to work)

I figure we don't offer any settings in the freenas plugins gui except enable/disable and possibly (http/https + port). all the settings can be found in the actual applications anyway.
 
Status
Not open for further replies.
Top