FreeBSD Install Problem

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
dastrix
Newbie
Newbie
Posts: 3
Joined: October 24th, 2010, 11:11 am

FreeBSD Install Problem

Post 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
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: FreeBSD Install Problem

Post 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.
dastrix
Newbie
Newbie
Posts: 3
Joined: October 24th, 2010, 11:11 am

Re: FreeBSD Install Problem

Post 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
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: FreeBSD Install Problem

Post 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.
SpankIt
Newbie
Newbie
Posts: 20
Joined: September 23rd, 2009, 8:25 pm

Re: FreeBSD Install Problem

Post 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"
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: FreeBSD Install Problem

Post 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.
SpankIt
Newbie
Newbie
Posts: 20
Joined: September 23rd, 2009, 8:25 pm

Re: FreeBSD Install Problem

Post 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"
Post Reply