Page 1 of 1

FreeBSD Install Problem

Posted: October 24th, 2010, 11:14 am
by dastrix
Hi Guys,

I am a total beginner with FreeBSD and i am trying to get SAB installed on this box but keep getting the following when trying to run SAB

/usr/local/lib/python2.6/site-packages/cherrypy/lib/cptools.py:3: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
/usr/local/lib/python2.6/site-packages/cherrypy/filters/sessionfilter.py:33: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha
Sorry, requires Python module Cherrypy 3.1 (use the included version)

Any Help would be greatly appreciated.

Thanks

D

Re: FreeBSD Install Problem

Posted: October 24th, 2010, 1:48 pm
by shypike
You may have noticed that SABnzbd comes with its own CherryPy module.
Where is it?
It looks like you misplaced it and SABnzbd will not work with any other previously installed CherryPy release.
There's not need to uninstall the CherryPy package,
but SABnzbd's own CherryPy should be in the subfolder CherryPy in the folder where SABnzbd.py and the other files reside.

Re: FreeBSD Install Problem

Posted: October 24th, 2010, 2:10 pm
by dastrix
All i did was run /usr/ports/news/sabnzbdplus/make install

it appears that it installs to where it likes i have the SABnzbd.py in /usr/local/bin

and the sab install seems to be in /usr/local/share/sabnzbdplus/ only has to directories tho languages and interfaces

Sorry for being a total noob

Thanks

Re: FreeBSD Install Problem

Posted: October 24th, 2010, 2:57 pm
by shypike
In that case you should complain to the package maker, that's not us.

Assuming that the package at least installed all prerequisites,
you can use our tar.gz distribution file.
Just unpack it at some location, leave the folder structure intact
and just start the SABnzbd.py script.

Re: FreeBSD Install Problem

Posted: October 25th, 2010, 8:57 pm
by SpankIt
I also had a bunch of issues installing it using the portsnap method. I have since deinstalled it and then installed it by manually downloading the source code and creating myself a rc.d script. When I run the script manually it runs fine with no errors. However when my server fires up and the rc.d script starts it my issue is that it does not find par2, unzip or unrar.

Here is my script

Code: Select all

#!/bin/sh

. /etc/rc.subr

name="SABnzbd"
sabusr="uname" # Enter SABnzbd username here.
sabpwd="pwd" # Enter SABnzbd password here.
sabapi="myapikey" # Enter SABnzbd API Key here.
start_cmd="${name}_start"
stop_cmd="${name}_stop"

SABnzbd_start()
{
    echo "Starting SABnzbd"
    /usr/local/bin/sudo -u root /usr/local/src/SABnzbd-0.5.4/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
}

SABnzbd_stop()
{
    echo "Stopping SABnzbd"
    /usr/bin/fetch "http://${sabusr}:${sabpwd}@localhost:8080/sabnzbd/api?mode=shutdown&apikey=${sabapi}" >/dev/null
}

load_rc_config $name
run_rc_command "$1"

Re: FreeBSD Install Problem

Posted: October 26th, 2010, 2:54 am
by shypike
The PATH environment variable in init.d scripts is usually minimal
and contains a lot less than in an interactive shell.
You'll have to extend the PATH variable in your script.
Find out where unzip, unrar and par2 are and add that path.

Re: FreeBSD Install Problem

Posted: October 26th, 2010, 9:31 am
by SpankIt
Thanks for your help. Here is the final script and the issues are all gone.

Code: Select all

#!/bin/sh

. /etc/rc.subr

name="SABnzbd"
sabusr="uname" # Enter SABnzbd username here.
sabpwd="pwd" # Enter SABnzbd password here.
sabapi="myapikey" # Enter SABnzbd API Key here.
start_cmd="${name}_start"
stop_cmd="${name}_stop"
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/b"

SABnzbd_start()
{
    echo "Starting SABnzbd"
    /usr/local/bin/sudo -u root /usr/local/src/SABnzbd-0.5.4/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
}

SABnzbd_stop()
{
    echo "Stopping SABnzbd"
    /usr/bin/fetch "http://${sabusr}:${sabpwd}@localhost:8080/sabnzbd/api?mode=shutdown&apikey=${sabapi}" >/dev/null
}

load_rc_config $name
run_rc_command "$1"