Package Details: sabnzbd 1.1.1-1

Git Clone URL: https://aur.archlinux.org/sabnzbd.git (read-only)
Package Base: sabnzbd
Description: A web-interface based binary newsgrabber with NZB file support
Upstream URL: http://www.sabnzbd.org
Keywords: network usenet
Licenses: GPL
Submitter: kvasthval
Maintainer: Revelation60
Last Packager: Revelation60
Votes: 240
Popularity: 3.098921
First Submitted: 2007-11-09 16:21
Last Updated: 2016-11-11 08:58

Required by (10)

Sources (9)

Latest Comments

storrgie commented on 2016-10-04 20:34

Is anyone else seeing excessive redirects when trying to download the package? Sorry, using pacaur.

spangry commented on 2016-09-15 19:21

Sabnzbd can't find pyopenssl unless I append 'PYTHONPATH=/usr/lib/python2.7/site-packages' to the start of /usr/bin/sabnzbd. Terminal output without the above, for me, reads: 2016-09-16 05:02:39,249::INFO::[SABnzbd:514] pyOpenSSL... NOT found! - Try apt-get install python2-openssl (SSL is optional)

It doesn't stop the program from starting and running, but try a regular start up in terminal and check the output. It might just be unique to how I have my env configured. If not, here's what my /usr/bin/sabnzbd shell script now reads:
#!/bin/sh
PYTHONPATH=/usr/lib/python2.7/site-packages python2 /opt/sabnzbd/SABnzbd.py -f ${HOME}/.sabnzbd.ini "${@}"

or if loading configuration from /opt:
#!/bin/sh
PYTHONPATH=/usr/lib/python2.7/site-packages python2 /opt/sabnzbd/SABnzbd.py -f /opt/sabnzbd/sabnzbd.ini "${@}"

I think this should work in every case (excluding a non-standard location for site-packages), because it only changes the env variable for that one execution instance. Same probably goes for the sabnzbd.desktop exec line and systemd service, but I haven't tested these yet. Anyhow, thanks for maintaining this package Revelation60 :)

francoism90 commented on 2016-09-15 17:40

@Revelation60: no probs, hope you had a nice trip! :)

Revelation60 commented on 2016-09-15 16:06

Sorry for the delay, I was on a hiking trip in Argentina.

The package is updated now. Note that if you want to update the icon for the .nzb files, you should run
xdg-icon-resource install --context mimetypes --size 256 /opt/sabnzbd/nzb.png application-x-nzb

(or you could reinstall the package).

cryzed commented on 2016-09-15 13:56

Any plans on updating this anytime soon?

Revelation60 commented on 2016-04-28 06:10

You are absolutely right! Fixed it now.

nightah commented on 2016-04-28 06:01

Looks like we're pulling from the upstream "Source Code (.tar.gz)" option on github (https://github.com/sabnzbd/sabnzbd/releases), there's a significant amount of diffs between the above version and (SABnzbd-1.0.1-src.tar.gz) though both are labelled as 1.0.1 release and functionally do not seem different.

If we want the versioning represented appropriately we can change the package to pull down the Linux source package (SABnzbd-1.0.1-src.tar.gz).

Do so by removing lines 32-35 in the PKGBUILD.

You also need to modify lines 15 and 30 respectively in the PKGBUILD to read as:

source=("https://github.com/${pkgname}/${pkgname}/releases/download/${pkgver}/${_pkgname}-${pkgver}-src.tar.gz"

cp -r "${srcdir}/${_pkgname}-${pkgver}/"* "${pkgdir}/opt/${pkgname}"

terminalmage commented on 2016-03-23 19:41

Yeah, I noticed this too, if anything this appears to be an upstream issue, because the tar archive for v1.0.0 is coming from upstream.

Robin67 commented on 2016-03-23 19:39

I just update sabnzbd with this package but it states it is version 0.8.x.
Within help as well as in the tab of my browser

Is this intended ?

Update: it can be easily corrected by editing /opt/sabnzbd/sabnzbd/version.py

mac1202 commented on 2016-03-23 07:29

upgrading from 1.0.0-1 to 1.0.0-2 I have to redo all the configuration, it's this normal ?

francoism90 commented on 2016-03-20 17:35

@Revelation60: could you update the systemd file? It should point to the config file:
ExecStart=/opt/sabnzbd/SABnzbd.py -10 -f /opt/sabnzbd/sabnzbd.ini

Thanks. :)

PS. I have updated the SABnzbd Wiki, would be great if you guys could take a look and fix/improve when needed. :)

Revelation60 commented on 2016-03-16 10:17

Sabnzbd is updated to version 1.0.0. This is a major update, so some reconfiguration using the web wizard is required. Remember to update the API key in /etc/conf.d/sabnzbd if you want to open .nzb files with sabnzbd.

Revelation60 commented on 2016-02-01 15:23

Done. Hopefully it is ok now.

Spyhawk commented on 2016-01-30 09:18

Please update the .SRCINFO file too, as the information provided by the RPC interface isn't correct and is needed by some helpers.

Paviluf commented on 2015-11-30 18:00

I think it's better to start sabnzbd only when you want to use it instead of having it always running for the obvious reason that you don't always download something.

Thanks to look at it !

Revelation60 commented on 2015-11-30 16:55

Ah, I was looking at a wrong version it seems. Anyway, I will see if I can make a hybrid that also works to start sabnzbd.

That being said, justin8 is right, the default procedure would be to start it as a service.

justin8 commented on 2015-11-30 16:52

Looks like he's right..
https://aur.archlinux.org/cgit/aur.git/tree/sabnzbd.desktop?h=sabnzbd

Either way, sab on linux is designed to be run as a service, which is included. I believe the .desktop is only there for file-association. so you can double click an nzb in nautilus/thunar/etc and have it add to sab. I'm not sure if there is a way to mark an application for that and not show up in applications menus otherwise though.

Paviluf commented on 2015-11-30 16:42

I don't know what happen but this is the content of sabnzbd.desktop and as you can see it call addnzb.sh :

[Desktop Entry]
Type=Application
Version=1.0
Name=SABnzbd+
GenericName=Binary Newsreader
Icon=/opt/sabnzbd/sab2_64.png
Exec=sh /opt/sabnzbd/addnzb.sh %u
Terminal=false
Categories=Network
MimeType=application/x-nzb

I'm on Manjaro KDE and I can't launch sabnzbd from the menu, only from the command line "sabnzbd".

Revelation60 commented on 2015-11-30 15:47

I don't understand what you mean. sabnzbd.desktop doesn't call addnzb.sh at all.

addnzb.sh is used to register the .nzb extension so that an nzb can be loaded. For this, sabnzbd needs to be running. You can use `systemctl start sabnzbd` to start sabnzbd.

Paviluf commented on 2015-11-29 11:07

"sabnzbd.desktop" launch "addnzb.sh" but that doesn't work (Manjaro). sabnzbd doesn't start.

If I simply start sabnzbd from a terminal with "sabnzbd", sabnzbd start and works.

Why are you using this to launch sabnzbd ?

#!/bin/sh
. /etc/conf.d/sabnzbd
curl -s -F apikey="$API_KEY" -F mode="addfile" -F name=@"$1" $URL/sabnzbd/api &> /dev/null

Thanks

carlwgeorge commented on 2015-11-14 16:31

Your PKGBUILD is at 0.7.20-2, but your .SRCINFO is at 0.7.20-1. Please fix it.

Paviluf commented on 2015-07-18 09:19

Thank you, that work now ;)

Revelation60 commented on 2015-07-17 12:23

I heard some stories that the people of Sourceforge are injecting spyware into their packages. I don't have the old version so I cannot verify if this is the case here. So yeah, let's switch to github.

Paviluf commented on 2015-07-17 12:19

Maybe we can use the archive from github ?

https://github.com/sabnzbd/sabnzbd/archive/0.7.20.tar.gz

Paviluf commented on 2015-07-17 12:17

The sourceforge link don't seem to work

==> Validating source files with md5sums...
SABnzbd-0.7.20-src.tar.gz ... FAILED
sabnzbd ... Passed
sabnzbd.desktop ... Passed
addnzb.sh ... Passed
nzb-2.png ... Passed
sab2_64.png ... Passed
x-nzb.xml ... Passed
sabnzbd.service ... Passed
sabnzbd.confd ... Passed
==> ERROR: One or more files did not pass the validity check!
==> ERROR: Makepkg was unable to build .

crookedasterisk commented on 2015-04-12 06:12

I like the idea of SABnzbd running as its own user for security purposes, but I just see one thing that would allow the sabnzbd user to gain access to another user: addnzb.sh is in sabnzbd's home directory where it as full permissions to it. addnzb.sh is invoked by sabnzbd.desktop which is run by other users. If SABnzbd was ever exploited, it could change the contents of addnzb.sh to something malicious and it would be run under other users. Perhaps addnzb.sh should be in /usr/lib.

There's also a typo in sabnzbd.install.

==> If you want to associate .nzb-files with SABnzbd, run 'xdg-mime default sabnzbd.desktop applications/x-nzb'
should be:
==> If you want to associate .nzb-files with SABnzbd, run 'xdg-mime default sabnzbd.desktop application/x-nzb'

(applications should be without an s)

tixetsal commented on 2015-04-03 19:09

Is anyone else experiencing an issue where the ETAs are no longer listed? I just get "checking" instead of the time to download.

tbgconno commented on 2014-12-07 13:30

Sourceforge link isn't working for some reason. I used this instead:
http://ftp.ie.vim.org/mirrors/download.sourceforge.net/pub/sourceforge/s/sa/sabnzbdplus/sabnzbdplus/0.7.20/SABnzbd-0.7.20-src.tar.gz

Bitl0rd commented on 2014-11-26 15:55

sourceforge is offline!!! mirror?

Revelation60 commented on 2014-09-23 10:14

Done.

brando56894 commented on 2014-09-23 01:51

Can you add this in as a(n optional) dependency? par2cmdline-tbb
It enables par2 multi-threading.

justin8 commented on 2014-04-23 14:05

The install script tries to run things that are not dependencies:

/tmp/alpm_jkHuMg/.INSTALL: line 12: xdg-mime: command not found
/tmp/alpm_jkHuMg/.INSTALL: line 13: xdg-icon-resource: command not found


Maybe add in an 'if [[ -f /usr/bin/xdg-mime ]]' around the command before running it and add it as an opt depend?

justin8 commented on 2014-04-02 00:10

That is what the sed commands in my first comment did. I use that to set it to a common use on my CI server before building it.

You also need to change the user in the service file if you want to run it as a regular service.

bowhuntr commented on 2014-04-01 22:42

I changed the pkgdir to install it to my home dir but that gave an error when I tried to run it. The simple solution was to go into the .install and change the user from sabnzbd to my user and the group I wanted. I now have access to the files it downloads.

bowhuntr commented on 2014-04-01 17:44

If I do that will it give my user ownership of the files?

donvla commented on 2014-04-01 17:08

@bowhuntr:
Sabnzbd tar.gz is selfcontained. That means you can simply extract its content to which directory you like and start sab by running "/usr/bin/python2 ./SABnzbd.py" from inside the sabnzbd directory. No real need for installation.

bowhuntr commented on 2014-04-01 16:47

If I do that will it give my user ownership of the files?

justin8 commented on 2014-04-01 09:10

That's not really how a service normally works. But it's up to you. change everything that has $pkgdir/opt to be $pkgdir/home/foo/bar/wherever/you/want.

bowhuntr commented on 2014-04-01 08:52

Could the install location be changed in the pkgbuild to make it install to my home directory?

justin8 commented on 2014-03-31 23:36

I do this before building it; just replace 'downloads' with whatever user you want it to install/run as (I have sickbeard/couchpotato/sab/transmission etc running as downloads user, and have my user accounts in the downloads group).

sed -i 's/="sabnzbd"/="downloads"/g' sabnzbd.install
sed -i 's/=sabnzbd/=downloads/g' sabnzbd.service
updpkgsums
makepkg -rcfs

bowhuntr commented on 2014-03-31 22:50

Since this app installs to /opt that means root owns it and my user can't access the files that are downloaded. Is there a work around for this?

Pietro_Pizzi commented on 2014-03-09 21:02

There are an 0.7.17RC2 with RAR 5.01 support. Is it possible to get that package? Eg. as a second beta AUR package if u think it isn't stable enough?

http://sourceforge.net/projects/sabnzbdplus/files/sabnzbdplus-beta/0.7.17RC2/

Pietro_Pizzi commented on 2014-03-09 20:57

There are an 0.7.17RC1 with RAR 5.01 support. Is it possible to get that package? Eg. as a second beta AUR package if u think it isn't stable enough?

LeoKesler commented on 2014-02-22 14:51

error: File "SABnzbd.py", line 20
print "Sorry, requires Python 2.5, 2.6 or 2.7."
^
SyntaxError: invalid syntax

emphire commented on 2013-12-15 11:14

Here is a pkgbuild with using /var/lib and /usr/lib rather than /opt. It also removes the call that stops the service on upgrade as that is not considered a good practice in PKGBUILDS.
http://s000.tinyupload.com/?file_id=17766270613158397121

ice9 commented on 2013-11-19 00:30

/var/lib/sabnzbd/ sounds like an excellent suggestion for the default installation location of sabnzbd.ini. And with the /etc/sabnzbd.conf file, the user could always change it to another location if desired.

emphire commented on 2013-11-18 23:48

I second that suggestion. I've been running it that way for some time (but I used /opt/sabnzbd/config/sabnzbd.ini). It would be nice not to have to change the permissions back on each upgrade.

I'd suggest putting the config in /var/lib (ie: CONFIG_FILE="/var/lib/sabnzbd/sabnzbd.ini") and then putting everything else under /usr/lib/sabnzbd. You could add some symlinks to /usr/bin and /etc/sabnzbd.ini.

ice9 commented on 2013-11-18 23:09

By the way, if you set the location of the sabnzbd.ini file, then sabnzbd will also create the admin/ and logs/ directories in the same location, and those are the only files and directories that need to be writeable.

Which means that you can install all the other sabnzbd program files in a more standardized location than /opt/sabnzbd/ , like /usr/bin/ and /usr/lib/sabnzbd/

ice9 commented on 2013-11-18 22:54

http://pastebin.com/s6Pt1zct

How about changing the systemd unit file to include a configurable location for the sabnzbd.ini file? Keeping it in /opt/sabnzbd/ is not the best idea.

With the unit file linked above, the user would create an /etc/sabnzbd.conf
file with contents such as:

CONFIG_FILE="/home/sabnzbd/sabnzbd.ini"

or perhaps something in their own user directory if they have overridden the
User=sabnzbd with another user by creating the path/file:

/etc/systemd/system/sabnzbd.service.d/user.conf
[Service]
User=anotherusername


cdemoulins commented on 2013-08-11 08:54

It's already an optional dependency as it should be.

carlwgeorge commented on 2013-08-11 00:51

My downloads recently stopped working. Turns out it was because I only had ssl sources configured, and you now need python2-pyopenssl installed for that to work. Can that be added as a dependency?

mrhanman commented on 2013-08-10 22:25

This doesn't work for me, either. It starts up, but then does nothing with no indication of what is wrong.

Anonymous comment on 2013-07-28 00:52

This doesn't work at all anymore. Tried from scratch brand new machine, multiple machines. It starts up ok, but hangs about 3-5 seconds in and just doesn't do anything. Searched the logs extensively and nothing to indicate any errors. When I stop the service, it hangs for ~2 minutes then says the process entered a failed state and kills it. Don't know what's wrong, but wiped my machine twice and tried installing this both on this machine and others.

zeppelinlg commented on 2013-07-11 21:26

Hi, I have an error when the source are downloaded.

==> Récupération des sources...
-> Téléchargement de SABnzbd-0.7.14-src.tar.gz...
** Resuming transfer from byte position 40960
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 2221k 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.

Thanks for your PKGBUILD :)

Revelation60 commented on 2013-05-19 09:24

I was going to update the ExecStart when a new version of sabnzbd is released. The reason for updating the log level is that SABnzbd will otherwise spam the journal with all sorts of info messages. This log level variable has no effect on SABnzbds log level of the web interface.

ajs124 commented on 2013-05-19 01:08

Is there any reason for the systemd service to be like this? Why not simply write "ExecStart=/opt/sabnzbd/SABnzbd.py -l0" instead of the current ExecStart?
And while I'm at it, what's the reason for overriding the default log level?

Revelation60 commented on 2013-04-09 20:46

No problem ;) That would be a nice feature indeed!

Romesnil commented on 2013-04-09 15:01

Oh sorry! I never noticed that optional dependencies are not shown in AUR web-pages. That should be added!

Revelation60 commented on 2013-04-09 13:21

It is already.

Romesnil commented on 2013-04-09 12:41

Hi! Can you add python2-pyopenssl [Extra] as optional dependency (required for ssl support)? Thanks !

lonaowna commented on 2013-04-06 18:30

Hey Hutchism, you need to change complete_dir in sabnzbd.ini. You can also do this through the web-interface.

Anonymous comment on 2013-03-21 01:49

Hey all. Trying to figure how to get sab to download to my home folder instead of /opt/sabnzbd. The sabnzbd_systemd file in the wiki is apparently obsolete, so how do I change the default folder location.

In the sab configuration I've tried putting "/home/USER/Downloads" and "~/Downloads". I know this is probably really simple, but I'm relatively new to linux.

ibexmonj commented on 2013-03-13 17:38

Sorry my bad
these were from yenc i installed yesterday
Fixed it just removed those files and installed sabnzbd using packer
Thank you so much

Now moving to couch and sickbeard

ibexmonj commented on 2013-03-13 17:23

I tried to check what package ownsthose files using pacman -Qo but it says
"No package owns...."

ibexmonj commented on 2013-03-13 17:23

I tried to check what package ownsthose files using pacman -Qo but it says
"No package owns...."

ibexmonj commented on 2013-03-13 17:20

I tried to check what package ownsthose files using pacman -Qo but it says
"No package owns...."

ibexmonj commented on 2013-03-13 17:20

@Revelation60

thank you so much for your help
I understand how to install packages form AUR now

I just installed packer after extracting the tarball and makepkg -s

Now when I do the same for sabnzbd it gives me an error
...... sabnzbd]$ makepkg -s
==> Making package: sabnzbd 0.7.11-1 (Wed Mar 13 13:06:40 EDT 2013)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: python2-yenc
==> ERROR: 'pacman' failed to install missing dependencies.

So I went to https://aur.archlinux.org/packages/python2-yenc/
and tried to install the same using pacman -U but i get error

error: failed to commit transaction (conflicting files)
python2-yenc: /usr/lib/python2.7/site-packages/_yenc.so exists in filesystem
python2-yenc: /usr/lib/python2.7/site-packages/yenc.py exists in filesystem
python2-yenc: /usr/lib/python2.7/site-packages/yenc.pyc exists in filesystem
Errors occurred, no packages were upgraded.


Is there a way to force the pacman or should I delete the files ?

Please advise

ibexmonj commented on 2013-03-13 17:17

@Revelation60

thank you so much for your help
I understand how to install packages form AUR now

I just installed packer after extracting the tarball and makepkg -s

Now when I do the same for sabnzbd it gives me an error
...... sabnzbd]$ makepkg -s
==> Making package: sabnzbd 0.7.11-1 (Wed Mar 13 13:06:40 EDT 2013)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: python2-yenc
==> ERROR: 'pacman' failed to install missing dependencies.

So I went to https://aur.archlinux.org/packages/python2-yenc/
and tried to install the same using pacman -U but i get error

error: failed to commit transaction (conflicting files)
python2-yenc: /usr/lib/python2.7/site-packages/_yenc.so exists in filesystem
python2-yenc: /usr/lib/python2.7/site-packages/yenc.py exists in filesystem
python2-yenc: /usr/lib/python2.7/site-packages/yenc.pyc exists in filesystem
Errors occurred, no packages were upgraded.


Is there a way to force the pacman or should I delete the files ?

Please advise

Revelation60 commented on 2013-03-13 16:43

Certainly, because installing packages yourself is not recommended.

Download packer from here:
https://aur.archlinux.org/packages/packer/

and follow the "Installing packages" instruction from here:

https://wiki.archlinux.org/index.php/AUR

Once packer is installed you can use it the same way as pacman, only for the AUR. So packer -S sabnzbd will install sabnzbd properly.

ibexmonj commented on 2013-03-13 16:33

I do not have AUR setup in my repository and I dont know how to.

I will have to look that up. Hence I downloaded the above tar.gz and all the dependencies and it works fine only thing is I have to manually run the sabnzbd.py file all the time to make it run

Do you still suggest I use packer ? Please advise any links for this

Revelation60 commented on 2013-03-13 16:20

By "from source" do you mean that you have not used this package? If so, then you have to write your own configuration files (or copy them from this package). Anyway, I recommend you use this package instead of installing sabnzbd yourself. To install packages from the AUR you can use packer for example. You can read more about this in the wiki.

If you are using this package however, there should be a service file in: /usr/lib/systemd/system/sabnzbd.service

ibexmonj commented on 2013-03-13 15:28

@Revelation60
Thank you for your response

Actually, I installed sabnzbd from source and the only place I have sabnzbd files are in my /home directory even the sabnzbd.py and sabnzbd.ini files are there

There is no sab nzbdfiles in either /usr/lib/systemd/system OR
/etc/systemd/system

So do I have to make those files manually ?

Revelation60 commented on 2013-03-13 07:53

Normally, you'd just do:

systemctl enable sabnzbd.service

to start on boot. If you've moved your sabnzbd files, you have to copy /usr/lib/systemd/system/sabnzbd.service to /etc/systemd/system/sabnzbd.service and edit the path to SABnzbd.py.

ibexmonj commented on 2013-03-13 03:22

I am really sorry about this question
pardon my noobness

I have tried to search a lot about starting SABnzbd on startup automaticall.

the archwiki is listing files in /opt and /etc that dont even exists

the only sabnzbd files i have are in my hoe directory and I use the following command to start sabnzbd always

~> python2 ./SABnzbd.py

How can I automate this ? Please advise

gtmanfred commented on 2013-03-04 02:19

Scratch that, i missed the find line, anyway, you don't need Type=simple and ExecStart should be ExecStart=/opt/sabnzbd/SABnzbd.py -l0

gtmanfred commented on 2013-03-04 02:05

please don't use sh -c in ExecStart or the python2 in it either, you should be replacing /usr/bin/python in all of the .py files to be /usr/bin/python2 to follow the guidelines from the rebuild for python3.3 and to follow http://www.python.org/dev/peps/pep-0394/ ... and once you do that, you can just launch ExecStart=/opt/sabnzbd/SABnzbd.py -l0

Revelation60 commented on 2013-03-01 09:59

It's an optional dependency, as you can see when you install the package.

jswagner commented on 2013-03-01 08:19

Re: extra/python2-pyopenssl

Seems sabnzbd should depend on this package, since it's necessary for SSL to work. This must be new, because I didn't need it when I set this up awhile ago..

Revelation60 commented on 2013-02-09 09:40

@farnoy: I'll check it out
@rodyakj: the wiki is outdated. The only config file is /etc/conf.d/sabnzbd and it only serves to link nzbs to sabnzbd.

Anonymous comment on 2013-02-08 22:58

Archwiki SABnzbd page gives instructions on editing /etc/conf.d/sabnzbd_systemd as if it already exists, and all its example scripts source variables from it. But the file doesn't exist and I had to add all the variables manually. Should this file be included in the AUR package, or does the wiki just need updating?

farnoy commented on 2013-02-08 22:27

Could we maybe include conf.d/sabnzbd.conf as EnvironmentFile for systemd unit file and provide an EXEC_OPTS option for users to specify additional options to pass to sab? I find myself modifying the unit file to specify my options.

Anonymous comment on 2013-01-28 00:24

For anyone who was having problems with nothing downloading (and using SSL connection with your provider), check to make sure extra/python2-pyopenssl is still installed.
Was stuck with this issue for a while before I read through the PKGBUILD again and saw it in optdepends. Sure enough, it somehow got uninstalled (perhaps through a recent cleaning out of old packages on my system) and thus couldn't make a proper connection to my provider (ie. no downloads).

n17ikh commented on 2013-01-20 08:55

For anyone (like me) who is still an initscripts holdout and had the somewhat unpleasant surprise that after updating the init script for sabnzbd had disappeared, I can report that the sabnzbd.init file included in the sabnzbd-git package on the AUR works fine, if you edit the path to SABnzbd.py.

gtmanfred commented on 2013-01-20 06:37

Why is your service unit so complicated... it could be better

http://ix.io/433

see if this works

Anonymous comment on 2013-01-17 19:04

works very good. Used it on windows before, but decided to go linux, since windows 8.
http://www.megadownloads.nl/handleiding/spotlite/sabnzbd-installeren.html

Evilandi666 commented on 2013-01-15 00:26

It works now, don't know what the problem was. Sorry for the confusing comments..

Revelation60 commented on 2013-01-08 08:57

Is it not downloading or does it not add files to the queue anymore? Try adding nzbs through the web interface. If this is your issue, fill in the API key in /etc/conf.d/sabnzbd.

Evilandi666 commented on 2013-01-07 23:05

Downgrade to 0.7.7 does NOT fix this.

... :(

Evilandi666 commented on 2013-01-07 23:02

0.7.9 breaks download for me. Nothing works anymore.

See http://forums.sabnzbd.org/viewtopic.php?f=2&t=12793 (also 0.7.8 seemed to be affected).

nhasian commented on 2013-01-07 16:59

@Gilrain: You are absolutely right. After I removed /etc/systemd/system/sabnzbd.service it loaded successfully. Thanks for your help!

Gilrain commented on 2013-01-07 15:55

Or because you're using an override (/etc/systemd/system/sabnzbd.service) based on the previous file...

Gilrain commented on 2013-01-07 15:54

@nhasian: The problem comes from systemd which tries to load the old service file. Issue "systemctl daemon-reload" as root to allow proper loading.

nhasian commented on 2013-01-07 15:51

updated from 0.7.7 to 0.7.9 and now SABnzbd no longer starts.

-- Unit sabnzbd.service has begun starting up.
Jan 07 08:42:46 archtop systemd[1]: Failed to load environment files: No such file or directory
Jan 07 08:42:46 archtop systemd[1]: sabnzbd.service failed to run 'start' task: No such file or directory
Jan 07 08:42:46 archtop systemd[1]: Failed to start SABnzbd binary newsreader.
-- Subject: Unit sabnzbd.service has failed

---------------------------------------

$ systemctl status sabnzbd.service

sabnzbd.service - SABnzbd binary newsreader
Loaded: loaded (/etc/systemd/system/sabnzbd.service; enabled)
Active: failed (Result: resources)
CGroup: name=systemd:/system/sabnzbd.service

Revelation60 commented on 2013-01-07 06:55

Updated the package to 0.7.9. It is safe to update again.

Lucky commented on 2013-01-07 02:03

@ALL DON'T UPDATE!!!

@Revelation60
please go back to 0.7.7 und wait for 0.7.9, because:

Release 0.7.8 is withdrawn.
It contains a very unpleasant bug.
When encountering a Usenet article that has a CRC error or is malformed,
the back-end of SABnzbd crashes internally.
This results in a gradual reduction of download speed until speed is 0.
Only a restart will fix this (possibly only temporarily).

Sorry for the inconvenience, there will be a 0.7.9 release as soon as the first
bug reporters have verified the solution to the problem.

Revelation60 commented on 2013-01-06 10:31

I did see, but I haven't had time to properly test. I'll update today :)

Lucky commented on 2013-01-06 01:06

@Revelation60
maybe you didn't see it, there is 0.7.8 out right now. :) wanna update?

Anonymous comment on 2013-01-05 13:02

I'm verry sorry, i just forgotten to set the user in installation process, now it works. Thanks for the fast reply.

Revelation60 commented on 2013-01-05 12:43

And is this a clean install? Are you sure that the directory of the logfile is owned by sabnzbd?

Anonymous comment on 2013-01-05 12:35

Yes, i do.

Revelation60 commented on 2013-01-05 12:24

"Can't write to logfile", are you using sabnzbd as user and group?

Anonymous comment on 2013-01-05 12:21

I also can't start the service, but I have another problem:

$ sudo systemctl status sabnzbd
sabnzbd.service - SABnzbd binary newsreader
Loaded: loaded (/etc/systemd/system/sabnzbd.service; enabled)
Active: failed (Result: exit-code) since Sa, 2013-01-05 13:12:12 CET; 47s ago
Process: 5205 ExecStart=/bin/sh -c python2 /opt/sabnzbd/SABnzbd.py (code=exited, status=2)
CGroup: name=systemd:/system/sabnzbd.service

Jan 05 13:12:10 asus systemd[1]: Starting SABnzbd binary newsreader...
Jan 05 13:12:10 asus systemd[1]: Started SABnzbd binary newsreader.
Jan 05 13:12:12 asus sh[5205]: Error:
Jan 05 13:12:12 asus sh[5205]: Can't write to logfile
Jan 05 13:12:12 asus systemd[1]: sabnzbd.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 05 13:12:12 asus systemd[1]: Unit sabnzbd.service entered failed state

Revelation60 commented on 2013-01-04 11:01

jrussell: looks like you're not the only one: http://forums.sabnzbd.org/viewtopic.php?f=2&t=12681&p=76726

Or is this your post as well? Maybe this issue is fixed in the next release.

jrussell commented on 2013-01-04 01:00

All from a fresh install of sabnzbd, clean config file and clean /etc/conf.d files

jrussell commented on 2013-01-04 00:56

cant run sabnzbd:

admin@russell-server ~ % sudo systemctl status sabnzbd.service
sabnzbd.service - SABnzbd binary newsreader
Loaded: loaded (/usr/lib/systemd/system/sabnzbd.service; enabled)
Active: failed (Result: exit-code) since Fri, 2013-01-04 02:53:11 SAST; 8s ago
Process: 6687 ExecStart=/bin/sh -c python2 /opt/sabnzbd/SABnzbd.py -l0 (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/sabnzbd.service

Jan 04 02:53:11 russell-server sh[6687]: import sabnzbd.downloader
Jan 04 02:53:11 russell-server sh[6687]: File "/opt/sabnzbd/sabnzbd/downloader.py", line 33, in <module>
Jan 04 02:53:11 russell-server sh[6687]: from sabnzbd.newswrapper import NewsWrapper, request_server_info
Jan 04 02:53:11 russell-server sh[6687]: File "/opt/sabnzbd/sabnzbd/newswrapper.py", line 449, in <module>
Jan 04 02:53:11 russell-server sh[6687]: _EXTERNAL_IPV6 = test_ipv6()
Jan 04 02:53:11 russell-server sh[6687]: File "/opt/sabnzbd/sabnzbd/newswrapper.py", line 435, in test_ipv6
Jan 04 02:53:11 russell-server sh[6687]: socket.IPPROTO_IP, socket.AI_CANONNAME)
Jan 04 02:53:11 russell-server sh[6687]: socket.error: [Errno 2] No such file or directory
Jan 04 02:53:11 russell-server systemd[1]: sabnzbd.service: main process exited, code=exited, status=1/FAILURE
Jan 04 02:53:11 russell-server systemd[1]: Unit sabnzbd.service entered failed state

Revelation60 commented on 2013-01-03 11:25

I've changed the file. Great work!

benjarobin commented on 2013-01-03 00:14

Please fix addnzb.sh and replace it by this much simpler and portable script (Do not need to create temporary file, ...)

#!/bin/sh

. /etc/conf.d/sabnzbd
curl -s -F apikey="$API_KEY" -F mode="addfile" -F name=@"$1" $URL/sabnzbd/tapi &> /dev/null

benjarobin commented on 2013-01-02 19:41

Please fix addnzb.sh and replace the 2 lines (copy and delete) by these (If the input file has the mode 400, the copy keep the 400 mode and sabnzb cannot read it) :

cp --no-preserve=mode,ownership,timestamps "$1" "$TEMP_NZB"
...
rm -f "$TEMP_NZB"

Revelation60 commented on 2012-12-30 09:15

@azeotrope: unfortunately the user and group cannot be set from an environment file. What you can do is copy the service file to /etc/systemd/system/sabnzbd.service. There you can make your changes. This file will remain untouched after an upgrade.

You still probably have to change the first variable in the install file or chmod the sabnzbd directory after an upgrade.

azeotrope commented on 2012-12-29 19:17

Would there be any chance of you adding the user and group that sabnzbd runs as into the conf.d file and loading this via systemd? It's not a big deal, would just be a nice feature so that service file won't need to be edited every time for those of us who use a different user/group. Thanks for the great work on this package.

Revelation60 commented on 2012-12-29 18:33

Ok guys, here's a new release with the following changes:

* Reintroduced /etc/conf.d/sabnzbd. This file has been made much easier and only serves for nzb association
* Cleaned up addnzb.sh
* Added parameter -l0 to sabnzbd to prevent spamming the system log with info messages

azeotrope commented on 2012-12-25 15:51

Revelation60 commented on 2012-12-25 12:29

The conf.d file has become obsolete, barring perhaps addnzb.sh. There is nothing in the service file anymore that requires parameters.

azeotrope commented on 2012-12-25 12:11

Revelation60, I don't really understand why the conf.d file was gotten rid of, since you can use it in systemd. systemd is able to read shell configuration files using the EnvironmentFile variable in a systemd service file. Have a look at how the NFS servive files are set up through systemd if you're not sure. This should get rid of the problem where the service file has to be edited EVERY time. I'm guessing this would also fix the addnzb.sh problem since the conf.d file doesn't have to be removed. This seems like a much cleaner solution than scripting around the problem.

Revelation60 commented on 2012-12-24 10:26

I've tried the script, but unfortunately sabnzbd.ini only has read permission for the sabnzbd user. Since the addnzb.sh script is executed as the current user, it can't read the data.

So in order for this to work, I have to give read permission to everyone. This file contains the usenet server login information and the sabnzbd password, so I guess people who use password protection on their sabnzbd web interface are not going to be happy about this.

Lucky commented on 2012-12-23 22:10

No problem Revelation60. :) SABNZBD_CONFIG = ini file, please report back if it works for you.

I have backup of 0.7.6/0.7.7-1 and -2 so i don't need the old scripts, but thanks.

The /opt choice is because its the simplest way, because you don't need to patch sabnzbd. With /{var,usr} you need to move/edit sabnzbd.ini and patch the source.
The problem is if you update, you need backup/change/merge stuff by hand (sabnzbd.ini).

Lucky commented on 2012-12-23 22:09

No problem Revelation60. :) SABNZBD_CONFIG = ini file, please report pack if it works for you.

I have backup of 0.7.6/0.7.7-1 and -2 so i don't need the old scripts.

The /opt choice is because its the simplest way, because you don't need to patch sabnzbd. With /{var,usr} you need to move/edit sabnzbd.ini and patch the source.
The problem is if you update, you need backup/change/merge stuff by hand (sabnzbd.ini).

Revelation60 commented on 2012-12-23 21:09

Thanks, Lucky! I'll test your script tomorrow :) If you still want the old scripts for reference (maybe you don't have them anymore), I can send them to you.

The choice for the /opt/ path was made by the previous mainainer, and I can't remember why this was chosen. Anyway, if you guys want a different path, I'll just change it.

Merry Christmas!

Lucky commented on 2012-12-23 20:15

PARSE_CONFIG(){
sed -n "/^\[misc\]$/ ba; d; :a p; n; /^\[/ d; ba" < "${SABNZBD_CONFIG}" | \
grep "${1}" | awk '{print $3}'
}

USERNAME="$(PARSE_CONFIG "^username =")"
PASSWORD="$(PARSE_CONFIG "^password =")"

API_KEY="$(PARSE_CONFIG "^api_key =")"
NZB_KEY="$(PARSE_CONFIG "^nzb_key =")"

PROTOCOL="$([[ "$(PARSE_CONFIG "^enable_https =")" -eq "0" ]] && echo "http" || echo "https")"
HOST="$(PARSE_CONFIG "^host =")"
PORT="$([[ "$(PARSE_CONFIG "^enable_https =")" -eq "0" ]] && echo "$(PARSE_CONFIG "^port =")" || echo "$(PARSE_CONFIG "^https_port =")")"

feel free to use this and have fun :) / merry christmas

I'm working on a new sabnzbd package, with proper install path (opt to usr and var), new confd file and init scripts (i know Revelation60 removed it). So maybe this would be not an "offical" AUR pkg.

Lucky commented on 2012-12-23 20:11

@Revelation60

PARSE_CONFIG(){
sed -n "/^\[misc\]$/ ba; d; :a p; n; /^\[/ d; ba" < "${SABNZBD_CONFIG}" | \
grep "${1}" | awk '{print $3}'
}

API_KEY="$(PARSE_CONFIG "^api_key =")"
NZB_KEY="$(PARSE_CONFIG "^nzb_key =")"

feel free to use this and have fun :) / merry christmas

I'm working on a new sabnzbd package, with proper install path (opt to usr and var), new confd file and init scripts (i know Revelation60 removed it). So maybe this would be not an "offical" AUR pkg.

Revelation60 commented on 2012-12-21 21:29

To load an NZB, the web interface has to be used via an URL. This URL should have the correct port, the correct protocol (http vs https) and the correct API key. Since there is no way for the script to know all this, I suggest you hardcode it in the script. So what you have to do is replace all variables by the correct values for your setup.

I am still thinking about a nice solution. The only thing I could come up with is parsing sabnzbd.ini (which may be not that easy).

wilberfan commented on 2012-12-21 17:19

As a noob, may I ask how addnzb.sh should be edited to make it work properly? What changes do we need to make?

Revelation60 commented on 2012-12-18 19:48

I see that this update breaks addnzb.sh :( I'll think about a good solution. In the mean time I guess you should edit it by hand, unfortunately.

Revelation60 commented on 2012-12-18 19:29

I have updated the package with many changes to make it easier for most users, so BEWARE before updating! Read this first:

1. It turns out (from this discussion: http://forums.sabnzbd.org/viewtopic.php?f=16&t=12575) that sabnzbd does actually shut down properly when a shutdown event is fired. This means that the service file can be simplified tremendously and that actually robotanarchy's version is just fine! The only small down side is that sabnzbd is quite verbose in the logs.
2. This also means that the configuration files are also no longer necessary. They have been REMOVED.
3. Initscripts have been REMOVED.
4. The install script has been simplified: on the top line you specify which user and group the sabnzbd files belong to. These default to sabnzbd. If you use custom users and groups you have to change them EVERY time the package is upgraded OR chmod /opt/sabnzbd yourself. You also (still) have to change the user and group in the service file (by copying it to /etc/systemd/system/sabnzbd.service and modifying it there, these changes will be kept). Note that the install script does not modify your custom groups, so just a single chmod has to be done after an update.

I hope the transition will be smooth.

Anonymous comment on 2012-12-14 17:33

Forgive me if this is a repost--I was unable to find this solution earlier--but anyone struggling to change the host IP to 0.0.0.0 must change it in /etc/conf.d/sabnzbd_systemd instead of sabnzbd.ini.

Anonymous comment on 2012-12-05 12:26

I'm having issues with this crashing and I'm unable to access it from another machine on the network even though I have set it to 0.0.0.0.

See my pastebin here: http://pastebin.com/NSZi3WiK

robotanarchy commented on 2012-12-02 21:08

oh and please also test my .service file if you want to add it to the package. I currently use it and it works fine, but I am not sure if it uses the same folder for all the data for example.

robotanarchy commented on 2012-12-02 17:28

(you should really get that right before removing the sysv-init style scripts)

robotanarchy commented on 2012-12-02 17:27

Hello, the .service file doesn't work quite good.
When you install sabnzbd for the first time, it seems like it does not create the pid file while you run the wizard, so systemd will kill it after a 2 minutes or something (-> you are in the middle of the wizard and don't know why it crashed).
I suggest a .service file like this:



[Unit]
Description=SABnzbd binary newsreader
After=network.target

[Service]
Type=simple
ExecStart=/bin/sh -c "python2 /opt/sabnzbd/SABnzbd.py"
User=sabnzbd
Group=sabnzbd

[Install]
WantedBy=multi-user.target




More advantages:
- you can actually use http[s] settings in the interface
- you don't need the extra config file with all its variables (user, password, api key, ...)
- you don't need to edit the .service file (!!!) in case you change the port
- you can see what sabnzbd is doing (because here the -d flag isn't used) with systemctl status sabnzbd
- this also 'survives' restarts from the webinterface, just checked that

Disadvantage:
- you can't stop sabnzbd with systemd. But I'd rather have it like that than copy over all the variables! If someone really
need that, we should try to the an upstream fix for an easy shutdown without all these variables that only works from the
local machine. Shutting it down via the webinterface and curl (if you really want that) still works anyway. You could also
add an example ExecStop line with example values and comment it out.

Anonymous comment on 2012-11-29 15:41

This might be an ignorant question, I'm not too familiar with packaging. I was wondering why we put sabznbd in /opt instead somewhere in /usr, as seems to be the case for most Arch packages? Seems like Debian puts sabnzbd also in /usr (http://packages.debian.org/squeeze/all/sabnzbdplus/filelist).

kvasthval commented on 2012-11-26 02:31

Is it possible for you to make python2-pyopenssl and python2-feedparser optional dependencies? Having to delete them from depends=() every time is pretty annoying when you don't need SSL and RSS support.

psychedelicious commented on 2012-11-22 02:25

Anyone know why Sabnzd doesn't actually shut the PC down any more?

Revelation60 commented on 2012-11-18 16:50

@bjo, are you sure you have set the port in the appropriate places? Please check the wiki if you're unsure.

@betrunkenaffe, the error message about not having found the pid yet is not really an issue, since it takes slightly more time for sabnzbd to create one. This message is unrelated to sabnzbd not starting properly. Are you sure you have set the ports and other settings correctly?

bjo commented on 2012-11-18 15:30

I get this issue, trying to run sabnzbd on 192.168.200.20:8888 (eth)
WARNING::[__init__:1063] Cannot access PID file /run/sabnzbd/sabnzbd-8888.pid


Revelation60 commented on 2012-11-18 13:11

I've updated the package. Note the following important things:

1. This will be the last version to support initscripts. When a new update comes, I will remove the files. Additionally, the sabnzbd_systemd.conf file will be renamed to sabnzbd.conf. To make this process seamless and to prevent loss of settings, overwrite sabnzbd.conf with sabnzbd_systemd.conf if you're using systemd now.

2. Some people still have issues with the PID file or with restarts, and I am not sure what's causing this. Maybe I shouldn't use forking, but make the process simple. If I look at the opensuse script (https://build.opensuse.org/package/view_file?file=SABnzbd.service&package=SABnzbd&project=home%3Achenxiaolong%3ASABnzbd), it is much shorter. My only worry is that sabnzbd may not shut down properly, which may cause data loss. Because I am uncertain about this, I'd like to have your input on this matter. What do you think is the best and safest approach?

Anonymous comment on 2012-11-18 03:38

If that was directed at me, tried that, still doesn't work, same error message.

bjo commented on 2012-11-17 15:50

sabnzbd.service has a typo. "ExecStart=/bin/sh/ -c" but it has to be /bin/sh

Anonymous comment on 2012-11-17 15:20

Trying to finish off the sysvinit switchover (and updated sab) and getting this error when it starts

Nov 17 09:06:46 hephaestus systemd[1]: Starting SABnzbd binary newsreader...
Nov 17 09:06:46 hephaestus systemd[1]: PID file /run/sabnzbd/sabnzbd-8080.pid not readable (yet?) after start.
Nov 17 09:06:47 hephaestus systemd[1]: Started SABnzbd binary newsreader.

It works fine via sysvinit, the user specified in /usr/lib/systemd/system/sabnzbd.service is sabnzbd and permissions on /run/sabnzbd are correct (it creates file, just can't read it). Any suggestions?

simon04 commented on 2012-11-08 23:52

Didn't try that, but I expect that to work as expected. HTTPS is neither essential for me nor did I use it ^^ …

Revelation60 commented on 2012-11-08 21:33

If you want https, you can read what to do on the wiki page. Have you tried this?

simon04 commented on 2012-11-08 18:21

Changing the following entry in /usr/lib/systemd/system/sabnzbd.service
> ExecStart=/opt/sabnzbd/SABnzbd.py -f /opt/sabnzbd/sabnzbd.ini -s 127.0.0.1:8080 -d --pid /run/sabnzbd/
as well as disabling https in /opt/sabnzbd/sabnzbd.ini
> enable_https = 0
(to have /run/sabnzbd/sabnzbd-8080.pid instead of /run/sabnzbd/sabnzbd-9090.pid) did the trick for me. Still not sure what causes these problems …

Revelation60 commented on 2012-11-08 07:42

That is very strange, since this package only updates /usr/lib/systemd/system/sabnzbd.service and nothing in the /etc/ directory except for /etc/conf.d/sabnzbd_systemd. But this file is included in backup.

Anonymous comment on 2012-11-07 23:07

@brando56894 @Revelation60 I ran into the same problem. The ,pid file reference in "/etc/systemd/system/sabnzbd.service" didn't contain the right port number because it seems to have been overwritten in a update.

Revelation60 commented on 2012-11-04 16:21

Well, this is a completely different issue, because sabnzbd.service is found and executed, only execution fails. Are you using custom settings, like custom ports, etc? Have you read the wiki (https://wiki.archlinux.org/index.php/SABnzbd)?

brando56894 commented on 2012-11-04 16:08

Didn't fix anything

[bran@ra ~]$ sudo systemctl --system daemon-reload
[sudo] password for bran:
[bran@ra ~]$ sudo systemctl start sabnzbd
Job for sabnzbd.service failed. See 'systemctl status sabnzbd.service' and 'journalctl -n' for details.
[bran@ra ~]$ sudo systemctl status sabnzbd.service
sabnzbd.service - SABnzbd binary newsreader
Loaded: loaded (/usr/lib/systemd/system/sabnzbd.service; enabled)
Active: failed (Result: exit-code) since Sun, 2012-11-04 07:05:34 EST; 23s ago
Process: 562 ExecStart=/bin/sh/ -c python2 ${SABNZBD_DIR}/SABnzbd.py ${SABNZBD_ARGS} --pid /run/sabnzbd (code=exited, status=2)
CGroup: name=systemd:/system/sabnzbd.service

Nov 04 07:05:34 ra systemd[1]: Failed to start SABnzbd binary newsreader.
Nov 04 07:05:34 ra systemd[1]: Unit sabnzbd.service entered failed state
[bran@ra ~]$ journalctl -n
Unprivileged users can't see messages unless persistent log storage is enabled. Users in the group 'adm' can always see messages.
[bran@ra ~]$ sudo journalctl -n
-- Logs begin at Sat, 2012-11-03 18:44:01 EDT, end at Sun, 2012-11-04 07:06:42 EST. --
Nov 04 07:05:34 ra systemd[1]: Starting SABnzbd binary newsreader...
Nov 04 07:05:34 ra systemd[1]: sabnzbd.service: control process exited, code=exited status=2
Nov 04 07:05:34 ra systemd[1]: Failed to start SABnzbd binary newsreader.
Nov 04 07:05:34 ra systemd[1]: Unit sabnzbd.service entered failed state
Nov 04 07:05:34 ra sudo[559]: pam_unix(sudo:session): session closed for user root
Nov 04 07:05:58 ra sudo[623]: bran : TTY=pts/2 ; PWD=/home/bran ; USER=root ; COMMAND=/usr/bin/systemctl status sabnzbd.service
Nov 04 07:05:58 ra sudo[623]: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov 04 07:05:58 ra sudo[623]: pam_unix(sudo:session): session closed for user root
Nov 04 07:06:42 ra sudo[708]: bran : TTY=pts/2 ; PWD=/home/bran ; USER=root ; COMMAND=/usr/bin/journalctl -n
Nov 04 07:06:42 ra sudo[708]: pam_unix(sudo:session): session opened for user root by (uid=0)

Revelation60 commented on 2012-11-04 11:11

Probably systemd caches all the files. Have you tried running 'systemctl --system daemon-reload'?

Revelation60 commented on 2012-11-04 11:11

It is working here. Probably systemd cashes all the files. Have you tried running 'systemctl --system daemon-reload'?

brando56894 commented on 2012-11-04 02:55

the SABnzbd target doesn't seem to exist in the right places or something since when I try to do "systemctl start <tab complete>" nothing shows up as shown here:

[bran@ra ~]$ sudo systemctl start
alsa-restore.service systemd-fsck@dev-disk-by\x2duuid-27df0f80\x2d1b79\x2d4bf1\x2dac89\x2d1dc0eb68a149.service
alsa-store.service systemd-fsck@dev-disk-by\x2duuid-30cd911b\x2dfb5d\x2d4f41\x2d9067\x2d39444c4726d6.service
auditd.service systemd-fsck@dev-disk-by\x2duuid-450fec66\x2dbe30\x2d4245\x2db81e\x2d857e6169a113.service
emergency.service systemd-fsck@dev-disk-by\x2duuid-5fb000cd\x2dd8cb\x2d4474\x2d8457\x2de7f5ebdae05b.service
emergency.target systemd-fsck@dev-disk-by\x2duuid-761c9327\x2dd247\x2d43ce\x2d8d93\x2db58e14d977d3.service
nss-user-lookup.target systemd-fsck@dev-disk-by\x2duuid-b2e2cf8d\x2d1cbe\x2d4b6c\x2daa52\x2d45eb5b93cec3.service
plymouth-quit-wait.service systemd-fsck-root.service
plymouth-start.service systemd-initctl.service
proc-sys-fs-binfmt_misc.mount systemd-journal-flush.service
rc-local.service systemd-random-seed-load.service
rescue.service systemd-random-seed-save.service
rescue.target systemd-readahead-collect.service
sshdgenkeys.service systemd-readahead-done.service
sys-kernel-config.mount systemd-readahead-done.timer
syslog.service systemd-readahead-replay.service
syslog.socket systemd-shutdownd.service
syslog.target systemd-tmpfiles-clean.service
systemd-ask-password-console.service systemd-update-utmp-runlevel.service
systemd-ask-password-wall.service systemd-update-utmp-shutdown.service
systemd-binfmt.service

but it does exist as seen here:

[bran@ra ~]$ locate .service|grep -i sabnzbd
/etc/systemd/system/multi-user.target.wants/sabnzbd.service
/usr/lib/systemd/system/sabnzbd.service


Maybe I'm doing something wrong since I just migrated from sysvinit to systemd about a week or so ago and I'm still trying to understand it fully. I copied /usr/lib/tmpfiles.d/sabnzbd.conf to /etc/tmpfiles.d/sabnzbd.conf since it wouldn't start on boot for me.

disastro commented on 2012-10-31 07:58

Set my user in sabnzbd_systemd, Can't write to logfile and it fails to start.

Chown /opt/sabnzbd, systemctl timeouts after starting it succesfulyl thus killing it

How the hell am I supposed to get this thing running?

robotanarchy commented on 2012-10-25 18:16

Could you make xdg-utils optional? It pulls xorg dependencies on headless machines. Thanks for the PKGBUILD!

terminalmage commented on 2012-10-24 03:21

@splippity: Please review the systemd wiki page. /etc/systemd and /etc/tmpfiles.d take precedence over the files installed by the package.

splippity commented on 2012-10-24 01:45

I too have the same issue. I also have to keep changing my /usr/lib/systemd/system/sabnzbd.service to reflect the correct user.

I just took the advice about copying the conf file from /lib/tmpfiles.d to /etc/tmpfiles.d
so hopefully that stabilizes that issue.

thanks

Evilandi666 commented on 2012-10-23 21:11

Ah sorry for bothering again, I should read better next time .. thx!

Revelation60 commented on 2012-10-23 21:05

No, he is correct. This means you shouldn't have to alter /usr/lib/tmpfiles.d/sabnzbd.conf. You have to copy it to /etc/tmpfiles.d/sabnzbd.conf and make your desired changes there.

Evilandi666 commented on 2012-10-23 20:55

For my own luck, I saw that you didn't add /usr/lib/tmpfiles.d/sabnzbd.conf to backup array again and added it on my own. :(
Is Gilrain's comment wrong on how to handle tmpfiles?

Revelation60 commented on 2012-10-23 16:58

I have added the environment file to the backup array and included After=network.target. I think that after a few releases I will make systemd the default since Arch moved to this as well (so no more ugly _systemd) and maybe even deprecate the rc.d script.

Does anyone still have the restart issue?

carlwgeorge commented on 2012-10-23 09:11

This kept failing to start at boot for me. I had to add this line to [Unit] section of the file sabnzbd.service.

After=network.target

Please include this line in the package by default. I can't think of a situation where you would be running sabnzbd without a network connection. Thanks!

roguewolf commented on 2012-10-16 14:29

@archtaku Ahh, thanks mate; It seems I was overlooking the obvious. SABNZBD_PORT was still set to 8080 in /etc/conf.d/sabnzbd_systemd. I've changed it to match the PIDFile in /etc/systemd/system/sabnzbd.service and all's well. Thanks for the assistance!

terminalmage commented on 2012-10-16 14:20

roguewolf: please pastebin your /etc/conf.d/sabnzbd_systemd and /etc/systemd/system/sabnzbd.service.

roguewolf commented on 2012-10-16 08:15

Could someone tell me, if I want to run sabnzbd with a custom port (e.g. 9765), what do I need to do?
I've tried copying /usr/lib/systemd/system/sabnzbd.service to /etc/systemd/system/ and changing PIDFile to 9765 but when I do I get 'failed (Result: timeout)' when attempting to start the service.
I'm still getting to grips with systemd so apologies if I'm overlooking anything obvious.

holyArch commented on 2012-10-08 10:49

backup is missing "etc/conf.d/${pkgname}_systemd"

Gilrain commented on 2012-10-08 08:18

> Could you please add /usr/lib/tmpfiles.d/sabnzbd.conf and /etc/conf.d/sabnzbd_systemd to the backup section?
The first one should not have been tampered with but copied to /etc/tmpfiles.d/sabnzbd.conf, where it will not be touched. See <https://wiki.archlinux.org/index.php/Systemd#Temporary_files>.
I second adding "etc/conf.d/${pkgname}_systemd" to the backup array.

Evilandi666 commented on 2012-10-06 23:10

Could you please add /usr/lib/tmpfiles.d/sabnzbd.conf and /etc/conf.d/sabnzbd_systemd to the backup section?
Otherwise it is a bit annoying for systemd users who don't use the standard user.
The update deleted half of my config..:(
Thx!

stefanwilkens commented on 2012-10-03 11:45

I created a wiki article:
https://wiki.archlinux.org/index.php/SABnzbd

Please add, might help prevent some of these recurring questions :)

Anonymous comment on 2012-10-01 11:02

@archtaku: Ah, thank you! That was somewhat trivial... I hope this helps another poor sod overlooking the obvious :)

terminalmage commented on 2012-09-28 04:37

@poltak: are you running sabnzbd as a user other than the sabnzbd user? If so, it might be permissions issues on /run/sabnzbd that are preventing the pidfile from being created. You might need to chown/chmod the /run/sabnzbd directory to make it accessible.

Anonymous comment on 2012-09-28 03:20

Mine doesn't even create a PID file. I've made sure that it's specified to create it in /run/sabnzbd using the --pid argument in the .service file's ExecStart parameter. Just running "sabnzbd" as user works fine and I can access the web UI, although trying "sabnzbd --pid /run/sabnzbd" as same user does not create a PID file at given path, and also does not even start the program (because the PID file doesn't exist, it times out starting the URLGrabber). I've searched through my system for all present PID files while running sabnzdb, but none for this process.
Of course, I want to be able to run it as a systemd daemon which requires the PID file. Anyone had similar issue with creation of PID file (from --pid arg)?

Revelation60 commented on 2012-09-26 07:32

That's what I said in my reply ;)

stefanwilkens commented on 2012-09-25 18:25

excuse the spam, my previous reply here has a simple answer:
When starting sabnzbd with https enabled, the pidfile changes from sabnzbd-8080.pid to sabnzbd-9090.pid (or whatever you've set your normal / ssl ports to in sabnzbd.ini).

The fix is to let systemd be aware of this though the service file:
1, edit /etc/systemd/system/sabnzbd.service to use sabnzbd-9090.pid
2. run "sudo systemctl --system reload"

Revelation60 commented on 2012-09-25 18:21

@stefanwilkens: did you change the port in the config file and in the sabnzbd.service file as well? If you haven't done the latter, systemd will look for the wrong pid file.

stefanwilkens commented on 2012-09-25 18:12

Another minor issue:
When enabling https (through sabnzbd.ini), systemctl start sabnzbd.service does start sab with ssl support on port 9090, yet systemd doesn't seem to be aware that it actually started. Sab is available and working, but after some time (~30 seconds) systemd appears to run into a time-out and kills the service. This is evident in the status report:

[stefan@lapsteef sabnzbd]$ sudo systemctl status sabnzbd.service
sabnzbd.service - SABnzbd binary newsreader
Loaded: loaded (/usr/lib/systemd/system/sabnzbd.service; disabled)
Active: failed (Result: timeout) since Tue, 25 Sep 2012 20:03:02 +0200; 13s ago
Process: 1800 ExecStart=/bin/sh/ -c python2 ${SABNZBD_DIR}/SABnzbd.py ${SABNZBD_ARGS} --pid /run/sabnzbd (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/sabnzbd.service

Again, it does start successfully with ssl support. It's systemd that seems to be unaware of this and thus kills it.

Revelation60 commented on 2012-09-24 19:08

@archtaku, in the comment I mention that you can't use environment file variables for the PIDfile, nor for User and Group. The same is true for variables in variables in the environment file. It didn't work in previous versions of systemd, perhaps it works now. I'll check if it does. Anyhow, I don't like the aggressive and disrespectful tone of your comments.

@stefanwilkens, I'll see if I can find the cause.

stefanwilkens commented on 2012-09-24 18:22

Has anybody been noticing that, when using systemd, sab seems unable to restart itself? Saving settings is done properly, but restarting the service is failing.

terminalmage commented on 2012-09-24 16:15

Reposting previous comment, made a mistake in the pastebin. Deleted original comment.

1) What on earth are you talking about? Line 2 of sabnzbd_systemd.confd is a comment.
2) sabnzbd_systemd.confd is NOT a systemd configuration file. It's an ENVIRONMENT file. It gets sourced by the systemd unit file. Don't you understand this?

To prevent pollution of the comments with tons of explanation, I put it in the following pastebin: http://pastebin.com/UQ59PxxA

terminalmage commented on 2012-09-24 16:13

1) What on earth are you talking about? Line 2 of sabnzbd_systemd.confd is a comment.
2) sabnzbd_systemd.confd is NOT a systemd configuration file. It's an ENVIRONMENT file. It gets sourced by the systemd unit file. Don't you understand this?

To prevent pollution of the comments with tons of explanation, I put it in the following pastebin: http://pastebin.com/FiH7hnYD

Revelation60 commented on 2012-09-22 09:16

1) I am talking about line 2 in sabnzbd_systemd.confd.
2) Parameters in definitions of parameters are not allowed in systemd configuration files. So repetition is necessary. The port variable is used in ExecStop.

terminalmage commented on 2012-09-22 04:44

1) Of course I haven't read all 216 comments. Deal with it.
2) I have no idea where you're going with this, since I made no mention of the sysvinit confd file. I was referring to the SABNZBD_ARGS parameter within sabnzbd_systemd.confd. It makes no sense to hard-code the port on this line when you have already assigned the port number to SABNZBD_PORT just a few lines earlier.

Revelation60 commented on 2012-09-21 07:48

If you've read the comments, you'll see that it is impossible at the moment to use a parameter for PIDfile. This is a missing feature of systemd. And second of all, I don't understand why you would use a variable in the configuration file itself. sabnzbd_systemd.confd is the configuration file for systemd and has nothing to do with sabnzbd.confd, because the syntax is different.

terminalmage commented on 2012-09-21 03:39

There are a couple things that should be changed to make this run more smoothly for those of us that are running sabnzbd on non-standard ports:

1) The systemd unit file (sabnzbd.service) should be modified so that the PIDfile parameter uses ${SABNZBD_PORT}, rather than 8080.
2) sabnzbd_systemd.confd should likewise be modified so that it uses ${SABNZBD_PORT} instead of 8080.

Revelation60 commented on 2012-09-10 08:01

The default sabnzbd download location /opt/sabnzbd/downloads and /opt/sabnzbd/downloads/incomplete is owned by the sabnzbd user. If you want a different download folder, make sure to enter the full path, and that the folder is accessible by members of the Users group. This means that all the underlying folders need the +x permission.

holyArch commented on 2012-09-09 21:46

holyArch: I cannot change Incomplete downloads folder.
Revelation60: Is de folder accessible by the sabnzbd user?

/etc/group sabnzbd:x:999:
/etc/passwd sabnzbd:x:999:999:SABnzbd user:/opt/sabnzbd:/sbin/nologin
Incomplete folder can be read by Users

Revelation60 commented on 2012-09-09 08:22

You can't install straight from the AUR using pacman, did you mean packer (sudo packer -S sabnzbd)? Anyhow, this is probably just a mistake on your end. You have used an outdated package stored in your filesystem, or there is a reason why sabnzbd won't upgrade. You can see if there is an error message during the upgrade. Also, if you are upgrading, you have to restart sabnzbd.

Anonymous comment on 2012-09-09 02:05

I just installed this package using pacman but the sabnzbd web interface shows version 0.7.2 (and update available) even though this page says version 0.7.3. How do I fix this?

Revelation60 commented on 2012-09-06 19:42

@Vash63, I don't know yet what's causing this issue.
@holyArch What do you mean?

holyArch commented on 2012-09-06 15:43

@Revelation60 how can I know?

sabnzbd:x:999:999:SABnzbd user:/opt/sabnzbd:/sbin/nologin

Vash63 commented on 2012-09-02 22:24

I almost have it working... it keeps resetting the host field to 127.0.0.1. I want it set to my PC's IP so I can access it remotely. Whether I set it in /etc/conf.d/sabnzbd_systemd or /opt/sabnzbd/sabnzbd.ini, it resets to 127.0.0.1 and I can only access it through localhost on the host system. Pretty annoying.

I'm not sure it's an arch-bug or not, it wasn't happening before I switched to systemd and I don't have that issue in Windows so I'm not sure if it's a bug with this specific package or something I should submit upstream.

emphire commented on 2012-09-02 22:02

I got it working. Just had to run: systemctl --system daemon-reload

emphire commented on 2012-09-02 20:29

I just switched to systemd and now I'm having issues with sabnzbd.

When I try to run load it manually (systemctl start sabnzbd) Sabnzbd starts-up and works when I try to access it from my browser, but systemctl doesn't exit. After a minute, systemctl says the job failed and sabnzbd gets a SIGTERM and exits. "systemctl status" shows that sabnzbd timed-out.

I do have sabnzbd set-up to run on an alternate port (5480) but I edited sabnzbd.service to use the changed PID file name:
PIDFile=/run/sabnzbd/sabnzbd-5480.pid

I can see that the PID file is created when sabnzbd starts and remains there until it gets the SIGTERM:
$ cat /run/sabnzbd/sabnzbd-5480.pid
9797

Does anyone have any ideas how I can troubleshoot this and get it working? Thanks!

jrussell commented on 2012-08-30 20:07

Just discovered /etc/conf.d/sabnzbd - nevermind my previous 4 comments :)

jrussell commented on 2012-08-28 18:56

In my sabnzbd log Ii get "API Key missing, please enter the api key from Config->General into your 3rd party program" upon every "rc.d restart sabnzbd" attempt

jrussell commented on 2012-08-28 18:51

In my sabnzbd log Ii get "API Key missing, please enter the api key from Config->General into your 3rd party program" upon every "rc.d restart sabnzbd" attempt

jrussell commented on 2012-08-28 18:50

I also get "Staring SABnzbd FAIL" when trying to restart sabnzbd with "rc.d restart sabnzbd"

jrussell commented on 2012-08-28 18:39

My host varibale in the sabnzbd.ini file keeps reseting to 127.0.0.1 upon every reboot. the /opt/sabnzbd folder is owned by sabnzbd, sabnzbd is running as sabnzbd...all other settings are still saved, my servers etc, I cant fiqure this out? Im running sabnzbd as a daemon from rc.conf

Revelation60 commented on 2012-08-22 08:14

You have to change the owner in sabnzbd.tmp as well. This gets installed at /usr/lib/tmpfiles.d/sabnzbd.conf

Anonymous comment on 2012-08-21 20:29

I've edited sabnzbd_systemd so I can run sabnzbd as myself, I've also taken ownership of /run/sabnzbd so the pid can be created, but on reboot the owner of /run/sabnzbd gets reset to sabnzbd:sabnzbd meaning my user cannot create the pid file and sabnzbd fails to start

Revelation60 commented on 2012-08-17 18:42

I do mention that you have to change it in the service file as well, in the comments of sabnzdb_systemd :)

Anonymous comment on 2012-08-17 17:09

I had some errors with the .pid file after moving to systemd, for some reason the .pid file was generated as sabnzbd-9090.pid. I solved it by changing the .service file in
/etc/systemd/system/sabnzbd.service
to use sabnzbd-9090.pid, did a systemctl --system reload and then it worked again :)

Revelation60 commented on 2012-08-14 16:33

Is de folder accessible by the sabnzbd user?

holyArch commented on 2012-08-14 15:41

I cannot change Incomplete downloads folder!

After setting download_dir to /home/holyarch/Downloads/incomplete/ in /opt/sabnzbd/sabnzbd.ini SABnzbd keeps ignoring and resetting it to "/Downloads/incomplete".

Any fix?

Anonymous comment on 2012-08-11 22:56

Not sure if this was a rookie mistake, but putting in my actual local ip didn't work, I tried replacing 127.0.0.1 with 0.0.0.0 and it works like a charm! thanks

Revelation60 commented on 2012-08-11 17:34

You can get more information from journalctl, but this might be a race condition error. I am just guessing, but maybe the network service has to be loaded before sabnzbd.

Anonymous comment on 2012-08-11 16:26

I am having trouble changing the local ip (from 127.0.0.1 to local ip) with the systemd setup (so that I can access it from my other computers). If I change it in the sabnzbd_systemd file, the unit fails to auto-load on reboot. But, I can start it manually (systemctl start sabnzbd.service) with the updated ip after boot and it works just fine. any ideas?

Revelation60 commented on 2012-08-10 08:45

Well, it should boot with the default configuration. I can imagine that if you only change your username in the conf file, it wouldn't work. You also have to chmod the sabnzbd folder.

Anonymous comment on 2012-08-09 20:18

ive updted to the newset version, but it no longer runs at boot, even though it is enabled to do so.
if i try to run it manually, with "/etc/rc.d/sabnzbd start" it then asks me for my password, but in the /etc/conf.d/sabnzbd file, i have my username set to my system user . if i type in my password, or roots password, it says its failed to start:

[eric@serv ~]$ su eric -c '/etc/rc.d/sabnzbd start'
Password:
:: Starting SABnzbd [BUSY]
Password:
[FAIL]

any ideas ?

Revelation60 commented on 2012-08-06 08:31

I have the same thing, but I don't know what causes this. I think this is a non-critical bug in the package itself.

nicoulaj commented on 2012-08-05 20:39

When the rc.d service starts, it prints message to stdout:

$ sudo rc.d start sabznbd

** (process:16917): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (process:16917): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (process:16917): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'

Revelation60 commented on 2012-08-04 09:19

Maybe Restart=on-success should be set. Though I doubt if sabnzbd can then be shutdown from the webinterface. There could also be a different reason for a failing restart, I'll look into it.

zebulon commented on 2012-08-03 16:09

I have tested and it seems to work fine. The only glitch is that, after using the wizard to fill up the settings, the daemon is not restarted, but left dead. Of course using systemctl start or systemctl enable and rebooting makes it work again. It is just as if the wizard was unable to restart a daemon with systemctl.

Revelation60 commented on 2012-08-03 12:43

I have added the temporary file and an entry in .install to execute systemd-tmpfiles (if it exists) as to create the directory straight after the upgrade.

zebulon commented on 2012-08-03 10:51

I cracked it! See https://wiki.archlinux.org/index.php/Systemd#Temporary_files
To create a temp file at boot, I created a file named /etc/tmpfiles.d/sabnzbd.conf containing:

d /run/sabnzbd 0755 sabnzbd sabnzbd -

Then it works! That is the "proper" method to create /run files and directories with systemd by the way. See also https://bbs.archlinux.org/viewtopic.php?pid=1115517#p1115517

Now for the PKGFILE, could you please add the /etc/tmpfiles.d/sabnzbd.conf as I described? Thanks in advance.

zebulon commented on 2012-08-02 15:38

:) I am trying to familiarise myself with systemd. I added:
ExecStart=/bin/mkdir "/run/sabnzbd" ; \
/bin/chown sabnzbd:sabnzbd "/run/sabnzbd" ; \
/bin/sh/ -c "python2 ${SABNZBD_DIR}/SABnzbd.py ${SABNZBD_ARGS} --pid /run/sabnzbd"

but I get this error:
sabnzbd.service has more than one ExecStart setting, which is only allowed for Type=oneshot services. Refusing.

Revelation60 commented on 2012-08-02 15:27

I am guessing he didn't reboot. :)

zebulon commented on 2012-08-02 14:32

Thanks. So I guess we need to fix the service file then? Iam surprised BuissonVert reported it was working properly. Or is it specific to my installation? Note I used the latest installer and converted my system to a "pure" systemd (no initscripts, but using systemd-sysvcompat).

Revelation60 commented on 2012-08-02 14:25

I uses a script to find the PID and it doesn't store it to a file.

zebulon commented on 2012-08-02 14:07

OK, but why is this working with initscripts?

Revelation60 commented on 2012-08-02 13:43

The installer creates the directory, but I guess the run folder is cleared at shutdown. The problem is that you have to be root in order to write a file in the run directory, so that's why I created the folder in the installer. The ExecStart line is run as sabnzbd, so it cannot create the folder.

zebulon commented on 2012-08-02 12:59

Further to my last comment, it appears that /run/sabnzbd is deleted at each reboot. Do you know what is causing this?

zebulon commented on 2012-08-02 12:57

Further to my last comment, it appears that /run/sabnzbd is deleted at each reboot. Do you know what is causing this?

zebulon commented on 2012-08-02 12:54

Yes, I am using 8080, and the server runs for one minutes, before it shuts down actually. /run/sabnzbd does not exist.
After I created /run/sabnzbd and chowned it to sabnzbd:sabnzbd, then the service works normally.
Should not /run/sabnzbd be created during installation?

Revelation60 commented on 2012-08-02 12:28

Are you using port 8080? Can you verify if the directory /run/sabnzbd exists and if it is owned by user sabnzbd? I get this message about the pid too, but it is created very soon after.

Revelation60 commented on 2012-08-02 12:27

Are you using port 8080? Can you verify if the directory /run/sabnzbd exists and if it is owned by user sabnzbd?

zebulon commented on 2012-08-02 12:25

Hi, systemd sabnzbd.service fails to run here. The log says:
PID file /run/sabnzbd/sabnzbd-8080.pid not readable (yet?) after start.
archbox systemd[1]: sabnzbd.service operation timed out. Terminating.

Indeed, the PID file is not created. Do you know what is causing this? I have Arch running in VirtualBox, but this may be unrelated.

Anonymous comment on 2012-08-01 20:14

The systemd support is working here. Thank you.

Revelation60 commented on 2012-08-01 10:18

I have added support for systemd. Due to limitations of the systemd unit file, you must set the user, group and port in the sabnzbd.service file as well. Also note that systemd has its own config file (in /etc/conf.d/sabnzbd_systemd). Please test if everything is working.

mrohnstock commented on 2012-07-21 15:24

please add "xdg-utils" as dependancy

Revelation60 commented on 2012-06-19 14:42

I'll see if I can write one in the near future.

Evilandi666 commented on 2012-06-14 16:19

Could you please include your Systemd Unit File, since systemd is now official in core repo ?

skydrome commented on 2012-04-08 06:28

sqlite3 has been renamed to sqlite

Anonymous comment on 2012-02-25 02:43

POSSIBLE BUG REPORT:

Is the sabnzbd.desktop correct with this 'Exec=sh /opt/sabnzbd/addnzb.sh %u'? Because this doesn't work for me...

If I run that in a terminal I get this back;

/opt/sabnzbd/addnzb.sh %u
curl: (7) couldn't connect to host
rm: cannot remove `/var/tmp/%u': No such file or directory

If all we're trying to do here is just launch sabnzbd then running it from /usr/bin works just fine, so I'm not sure why the Exec= isn't this; Exec=/usr/bin/sabnzbd


THANKS

emphire commented on 2012-02-06 19:04

If you create a directory "/opt/sabnzbd/config" and set SABNZBD_CONF="/opt/sabnzbd/config/sabnzbd.ini" in the conf.d file, then you can set sabnzbd as the owner of "/opt/sabnzbd/config" and leave everything else under "/opt/sabnzbd/" as owned by root. I think this might be a bit more secure.

holyArch commented on 2012-01-24 16:36

Great app.

Lucky commented on 2012-01-22 01:43

removed last comment, because outdated
par2cmdline is now in community
par2cmdline-git is in AUR https://aur.archlinux.org/packages.php?ID=55963 provide by BlackEagle

Lucky commented on 2012-01-20 12:19

So... par2cmdline is back https://aur.archlinux.org/packages.php?ID=55949 by BlackEagle

It was at community, but now its back @ AUR.

Revelation60 commented on 2012-01-20 09:45

I guess you could try par2cmdline-tbb for the time being, but I haven't tested if this works.

Anonymous comment on 2012-01-20 00:33

i see...well hope it makes it soon...just came back to arch so need sabnzb now

harveythedog commented on 2012-01-20 00:18

It's going to community apparently.

Anonymous comment on 2012-01-20 00:08

par2cmdline is gone...

francoism commented on 2012-01-12 20:14

Can someone please help me? I don't have problems on my laptop.. but on my desktop pc I get this error when creating folders:
Incorrect parameter Cannot create download_dir folder ...

After installation I start sabnzbd with /etc/rc.d/sabnzbd and I also have added the correct keys to the /etc/conf.d/sabnzbd file.

What is wrong?

/cat/passwd:
sabnzbd:x:999:999:SABnzbd user:/opt/sabnzbd:/sbin/nologin

Thanks!

francoism commented on 2012-01-12 20:13

Can someone please help me? I don't have problems on my laptop.. but on my desktop pc I get this error when creating folders:
Incorrect parameter Cannot create download_dir folder ...

After installation I start sabnzbd with /etc/rc.d/sabnzbd and I also have added the correct keys to the /etc/conf.d/sabnzbd file.

What is wrong? I'm I missing the sabnzbd user?

Thanks!

Revelation60 commented on 2012-01-05 12:16

Did you update the configuration file /etc/conf.d/sabnzbd?

zatricky commented on 2012-01-05 12:15

Ah. Sorry for comment-spam. I forgot to merge /etc/conf.d/sabnzbd.pacnew
All sorted now :)

zatricky commented on 2012-01-05 12:11

I updated today but hadn't been doing updates for a while. Now see that sabnzbd isn't daemonising - its staying in the foreground. :-/ I'll post an update once I figure out why.

Anonymous comment on 2011-12-12 16:22

thanks, now it is working again!

Revelation60 commented on 2011-12-10 18:19

I've updated the package. Good work, Lucky and nicoulaj!

Lucky commented on 2011-12-10 18:04

I know nicoulaj, but with this upgrade i want a package that doesn't break anything. The USE_SYSTEM_IDS var is only temporary and will removed with a 0.7.x version, then system ids is for all users default (new install and upgrade).

The UID, GID, AGROUP options are on my mind ;), because i want static IDs and use the users group for dl dir access. (OpenVZ setup and sabnzbd runs in a container)
So i want provide this options to other users, maybe they want this too. I will think about it to remove this options later, but for now i will provide it.

I see a "bug", if you set USE_SYSTEM_IDS only and upgrade the package the user/group id is non a system id! So there are 3 options how to fix this: change UID/GID manually, change UID/GID in confd file and upgrade, remove old user/group and recreate them [manually or with upgrade] (thats what i used for 0.6.10 package).

nicoulaj commented on 2011-12-10 14:52

Works fine for me, thanks for your work.

A few remarks: IMHO and from what I saw in other packages, the package should only create a sane, minimal setup to run the software and let users mess with it if they want to. In our case, all we need is a user that owns /opt/sabnzbd. In the case of a fresh install, we create it as a system user. In the case of an upgrade, we check it exists and owns /opt/sabnzbd and correct if it's not the case. See the postfix package, for example. That's why I think there should not be USE_SYSTEM_IDS, SABNZBD_UID, SABNZBD_GID and SABNZBD_AGROUP options, that can have contradictory values. If the users want to modify the sabznbd user/group, they can.

nicoulaj commented on 2011-12-10 14:51

Works fine for me, thanks for your work.

A few remarks: IMHO and from what I saw in other packages, the package should only create a sane, minimal setup to run the software and let users mess with it if they want to. In our case, all we need is a user that owns /opt/sabnzbd. In the case of a fresh install, we create it as a system user. In the case of an upgrade, we check it exists and owns /opt/sabnzbd and correct if it's not the case. See the postfix package, for example. That's why I think there should not be USE_SYSTEM_IDS, SABNZBD_UID, SABNZBD_GID and SABNZBD_AGROUP options, that can have contradictory values. If the users want to modify the sabznbd user/group, they can.

Lucky commented on 2011-12-10 02:59

CHANGELOG:
- When retrying an URL fetch from History, remove the History entry
- Fix job folder creation by Movie Sort when the Sort expression specifies one
- Fix problem with retrieving ZIP files from some web sites
- Improve detection of encrypted RAR files during download
- When par2 fails and SFV-check enabled, verify using SFV files
- Perform extra checks on job administration
- Fix logging of pre-queue script result
- Better support for Yahoo pipes
- Accept NZB files containing incorrect dates
- Make sure that paths coming from Sorting are normalized for the platform
- Make newzbin "Get bookmarks now" button independent of automatic readout
- Don't reset watched folder path to default when it doesn't exist at startup
- OSX: Fix Growl issues
- OSX: Show the promised 10 queue entries in the OSX menu instead of 9

Note: the above are the differences from 0.6.10
Releases 0.6.11/12/13 have been cancelled.

CHANGES:
- update to version 0.6.14
- sabnzbd uses now a system[user,group] by default only clean installs <- thx nicoulaj
- sabnzbd stops for package upgrade, you need to start it again!
- rework of the installscript to support uid/gid and other stuff and make it cleaner.
- rework of the initscript, now supports force-{stop,restart} (kills SABnzbd process, not recommended), status.
- rework /etc/confd/sabnzbd file, please merge with new one (SABNZBD_DIR, SABNZBD_UID, SABNZBD_GID,USE_SYSTEM_IDS , ALTERNATIV_GROUPS)
- If you want use SYSTEM IDS too, upgrade this package -> merge confd and enable USE_SYSTEM_IDS (if you also want your own uid/gid enable this too) -> upgrade package again and sabnzbd uses now new uid/gid. chown your incomplete/download dirs too, if required.

PACKAGE: http://hydra.lky.cc/lucky/pkgbuild/builds/sabnzbd/sabnzbd-0.6.14-1-any.pkg.tar.xz
SOURCE: http://hydra.lky.cc/lucky/pkgbuild/sources/sabnzbd/sabnzbd-0.6.14-1.src.tar.gz

@nicoulaj please test this again. thanks
@all feel free to test this, too and give feedback :)
@Revelation60 I think now you can merge the AUR package with this source. Or wait 1-2 days, if someone has trouble with my package/sources.

kakalaky commented on 2011-12-07 19:44

Experiencing the same problem as Ralfk.

Anonymous comment on 2011-12-07 18:32

2011-12-07 19:28:33,432::ERROR::[SABnzbd:1410] Failed to start web-interface:
Traceback (most recent call last):
File "/opt/sabnzbd/SABnzbd.py", line 1402, in main
cherrypy.engine.start()
File "/opt/sabnzbd/cherrypy/process/wspbus.py", line 184, in start
self.publish('start')
File "/opt/sabnzbd/cherrypy/process/wspbus.py", line 147, in publish
output.append(listener(*args, **kwargs))
File "/opt/sabnzbd/cherrypy/process/servers.py", line 62, in start
self.wait()
File "/opt/sabnzbd/cherrypy/process/servers.py", line 97, in wait
raise self.interrupt
error: [Errno 97] Address family not supported by protocol
2011-12-07 19:28:33,433::ERROR::[SABnzbd:300] Fehler beim Starten der Weboberfläche. : [Errno 97] Address family not supported by protocol

so I think I have the mentioned problem...

Revelation60 commented on 2011-12-07 06:58

No problem here, but if any of you report it, I'll revert.

Lucky commented on 2011-12-07 02:25

http://forums.sabnzbd.org/viewtopic.php?f=8&t=9530

by shypike on December 6th, 2011 3:47 pm
"We're withdrawing releases 0.6.11 and 0.6.12 while preparing 0.6.13.
There are too many reports of systems affected by the "will now listen on all localhost addresses" feature.
We're removing the feature all together."

@bszmyd
I don't have a issue with the "listen on all localhost addresses" feature, but maybe other users... so feel free to wait for an 0.6.13 release. Thank you for this information.

bszmyd commented on 2011-12-07 01:54

0.6.11 and 0.6.12 have been withdrawn by the developers, anyone having issues?

Revelation60 commented on 2011-12-06 19:46

For now, I'll just increment the version number.

Lucky commented on 2011-12-05 20:21

@Revelation60
Thats ok, please use NOT the system (UID/GID) sources yet.

I need to change some stuff there before we can merge this to the AUR Package. (upgrade issues and so on)

Revelation60 commented on 2011-12-05 20:05

I'll update tomorrow. You can probably update yourselves by changing the release number.

francoism commented on 2011-12-05 19:45

Again new version.. 0.6.12..

Thanks for your package :)

nicoulaj commented on 2011-12-01 08:04

Thanks, I tested it. I don't know if it's a packaging issue or a pure Sabnzbd one, but after the upgrade, *some* of the settings were lost, like the queue directory, so I lost the whole queue of downloads. This can be fixed manually by moving <TMP_DIR>/**/*.nzb.gz back to your watch directory though.

Lucky commented on 2011-12-01 00:33

IMPORTANT
You also need to chown your dirs/files again to your user/group!

chown -R sabnzbd.sabnzbd /path/to/dl/dir

PLEASE TEST THIS PACKAGE.

Lucky commented on 2011-12-01 00:24

CHANGELOG:
Improve detection of encrypted RAR files during download
SABnzbd will now listen on all "localhost" addresses This should prevent problems on IPV6-enabled systems
Remove unneeded extra temporary folder level in Generic Sort
When par2 fails and SFV-check enabled, verify using SFV files
Perform extra checks on job administration
Fix logging of pre-queue script result
Better support for Yahoo pipes
Accept NZB files containing incorrect dates
Make newzbin "Get bookmarks now" button independent of automatic readout
OSX: Fix Growl issues
OSX: Show the promised 10 queue entries in the OSX menu instead of 9

CHANGES:
update to version 0.6.11
sabnzbd uses now a system[user,group] <- thx nicoulaj

PACKAGE: http://hydra.lky.cc/lucky/pkgbuild/builds/sabnzbd/sabnzbd-0.6.11-1-any.pkg.tar.xz
SOURCE: http://hydra.lky.cc/lucky/pkgbuild/sources/sabnzbd/sabnzbd-0.6.11-1.src.tar.gz

PLS STOP SABNZBD BEFORE YOU UPGRADE!

Anonymous comment on 2011-11-17 17:09

I'm not sure if it's the same thing, but yesterday I had to do a hard reset of my server as well. I couldn't contact sabnzbd and rebooting was stuck on shutting down sabnzbd. So possibly the same thing... Haven't had the problem since then though.

Anonymous comment on 2011-11-17 16:44

Is anyone else having problems with python2-2.7.2-1 (x86_64) crashing the system? The only thing I use the python2 package for is SABnzbd+. The crashes occur pretty much every 2 or 3 hours of use. It's making my server unusable.

Anonymous comment on 2011-11-07 20:36

It's okay for me, I just checked my sickbeard-git dependencies and it said python2-cheetah. Anyway, you can always forcefully remove python-cheetah using pacman -Rdd (I think, check man pacman to be sure). Then install python2-cheetah.

wilberfan commented on 2011-11-07 18:41

Is it still the case that we can't upgrade to sabnzbd 0.6.10 if we have sickbeard installed, because of the python- python2- issue? Or is there a workaround for that...?

nicoulaj commented on 2011-10-31 16:20

@Lucky
Why don't you just let the system attribute the UID/GID ? Creating a system user will ensure a UID < 1000, isn't this sufficient in this case ?

Anonymous comment on 2011-10-22 22:11

I appreciate the help Dala, I am running out of ideas. How do I run python in debug mode? The frustrating part is it is so random. I think I am going to put this on the back burner for now.

Dala commented on 2011-10-22 21:36

okay, just making sure :) good luck with debugging, you could try if you can run python in debug mode to get more information about the segfault? Since segfault is not something you'd expect from a evaluated language..

Anonymous comment on 2011-10-22 20:24

@Dala
Yes, I have run memtest86+ numerous passes, no failures.

Dala commented on 2011-10-22 08:30

@brad0383 Have you tried running a memcheck86+ to make sure it's not your memory causing problems?

Anonymous comment on 2011-10-21 18:39

@Lucky
Thanks for your help. I have been using the sabnzbd forum as well. They are pointing the finger at everything but sabnzbd. The weird thing, is that sometimes it will run for a day or two, then it will crash every 5 minutes.

Lucky commented on 2011-10-21 17:07

@brad0383
sry, but i can't help you because on my side sabnzbd works fine. please use the sabnzbd forum, irc channel or fill a bug report, maybe there would be help for you.

Anonymous comment on 2011-10-21 11:51

I just wiped my drive and re-installed Arch thinking that there might be some strange corrupt installation of something. I am still getting sabnzbd crashes with a segmentation fault. I can't believe I am the only one getting this.

Revelation60 commented on 2011-10-20 17:45

I've updated the package, but because of the transition to python2-cheetah, it's going to be one of those painful updates again. If you have sickbeard installed, you can't update, because the sickbeard package still depends on python-cheetah. If you don't have it installed, you can remove python-cheetah with pacman -Rdd python-cheetah.

Anonymous comment on 2011-10-19 18:48

I spoke too soon! It ran all day yesterday just fine. Now it's crashing again.

Anonymous comment on 2011-10-19 13:02

Update to my crashing problem:
If your download queue size is more than the available space on the incomplete directory, it will crash. I had the completed directory on my /home folder but not the incomplete. I changed the incomplete directory to the /home partition and now everything works great.

Lucky commented on 2011-10-17 23:38

ALL OK

my fault

s, h, b, create_time, original_req^headers = cache_date
to
s, h, b, create_time, original_reqheaders = cache_date

A typo in the build package, but i don't know how i made it ;)

Lucky commented on 2011-10-17 23:13

CURRENTLY NOT WORK

i got some errors

Traceback (most recent call last):
File "/opt/sabnzbd/SABnzbd.py", line 43, in <module>
import cherrypy
File "/opt/sabnzbd/cherrypy/__init__.py", line 161, in <module>
from cherrypy import _cptools
File "/opt/sabnzbd/cherrypy/_cptools.py", line 228, in <module>
from cherrypy.lib import caching as _caching, wsgiapp as _wsgiapp
File "/opt/sabnzbd/cherrypy/lib/caching.py", line 130
s, h, b, create_time, original_req^headers = cache_data
SyntaxError: can't assign to operator

Lucky commented on 2011-10-17 22:55

@krzd
thanks for info

CHANGELOG:
Allow saving of category paths ending in a *. This feature (*) will prevent the creation of job folders in the final folder
Fix incompatibility with unrar 4.01 regarding detection of encrypted files
Create .bak (backup) file for sabnzbd.ini before modifying it
Convert ambiguous Windows paths like D: and D:folder to D:\ and D:\folder
Fix file name encoding problems when verifying using SFV files
Prevent reading newzbin bookmarks when newzbin credentials are not set
OSX: Compatible with Growl 1.2.2 and 1.3
OSX: Prevent changes to SABnzbd.app folder which confused the OSX Firewall
OSX: Fix access rights of SABnzbs.app so that restricted users can run SABnzbd
OSX: Combined SnowLeopard/Lion DMG and separate Leopard DMG

CHANGES:
update the dependency "python-cheetah" to "python2-cheetah"
update to version 0.6.10

PACKAGE: http://hydra.lky.cc/lucky/pkgbuild/builds/sabnzbd/sabnzbd-0.6.10-1-any.pkg.tar.xz
SOURCE: http://hydra.lky.cc/lucky/pkgbuild/sources/sabnzbd/sabnzbd-0.6.10-1.src.tar.gz

Anonymous comment on 2011-10-17 20:27

0.6.10 is out. python-cheetah is no longer in AUR, it is now available in [community] under the correct named python2-cheetah.

Anonymous comment on 2011-10-17 02:39

I ran from the CLI and got this message:
/usr/bin/sabnzbd: line 3: 1698 Segmentation fault python2 /opt/sabnzbd/SABnzbd.py -f ${HOME}/.sabnzbd.ini "${@}"

Revelation60 commented on 2011-10-16 18:51

Do you get a crash message? Maybe there is something wrong with the rights of the log folder or something like that.

Anonymous comment on 2011-10-16 16:34

sabnzbd-git does the same thing. I may just give up on this.

Anonymous comment on 2011-10-15 22:10

Every time I think it's working it starts crashing again. I am going to give sabnzbd-git a try and report back.

Anonymous comment on 2011-10-15 20:13

@Revelation60
Wow! How did I miss that one?! Thanks!

Revelation60 commented on 2011-10-15 19:34

@brad0383: did you correctly set the permissions of your /home/brad/ folder? You must allow browsing access (+x).

Anonymous comment on 2011-10-15 19:32

I re-installed and seems to be working now. Why can't I change the completed Download directgory to my home Videos directory? I have tried changing the permissions to 777, I also tried chown to sabnzbd:sabnzbd and it still gives me the error of:

"Incorrect parameter

Cannot create complete_dir folder /home/brad/Videos"

Lucky commented on 2011-10-15 18:24

@nicoulaj
I see, but i want a unique uid and gid for sabnzbd. id 420 maybe, is there a list which ids other services use, i found only a list for ids <100.

The ID need to be <1000.

@brad0383
Mhmm, sry no idea, but give a try to sabnzbd-git or sabnzbd-develop-git. If this also not help, fill a bug upstream. (http://forums.sabnzbd.org/viewforum.php?f=3)

nicoulaj commented on 2011-10-15 17:37

Hi, great package but it creates a non-system user that shows up as a regular user in GNOME logon screen for example.
Replacing the "useradd" line in sabnzbd.install with the following one should fix it (untested):

useradd -g sabnzbd -d /opt/sabnzbd -s /bin/false -m -r sabnzbd &> /dev/null

Anonymous comment on 2011-10-15 13:56

@Lucky
I spoke too soon, it's still crashing. Any other ideas?

Anonymous comment on 2011-10-14 22:34

@Lucky
It appears to be working now. The crashes were very random so I will let it run for awhile and post an update in a day or 2. THANKS!

Lucky commented on 2011-10-14 20:21

@brad0383
Test with old python2-yenc please: http://hydra.lky.cc/lucky/pkgbuild/sources/python2-yenc-0.3-1.src.tar.gz

Anonymous comment on 2011-10-14 18:57

I am having a problem with SABnzbd crashing. It will just stop running. I have ran it with debug mode on and it just stops, nothing is the log. It is completely random how long it will run, but it stops during decoding. The last line of the log is always similar to this:
2011-10-14 13:30:55,661::INFO::[assembler:85] Decoding /home/<user>/Downloads/Sabnzbd/incomplete/xxxxxxxxxxxxxxxxxx.r00 yenc
Any ideas?

LeCrayonVert commented on 2011-09-24 08:14

Lucky > thx, it works ;)

Lucky commented on 2011-09-22 06:48

@LeCrayonVert
Hi, did you add the correkt SABNZBD_KEY= in /etc/conf.d/sabnzbd, then the rc.d script will work.

I know "this problem" so i add a kill command in sabnzbd.install (for remove)..

LeCrayonVert commented on 2011-09-21 18:49

It seems that the SABNzbd.py process isn't killed when you stop the daemon with /etc/rc.d/sabnzbd stop
You might want to review the stop) section in the rc.d script (especially, the curl call).

Revelation60 commented on 2011-09-14 07:16

I've updated the package. The transition won't be smooth, because python-yenc en python2-yenc are currently the same package. I've requested the maintainer of python2-yenc to add a conflict for now. I'm also going to try and write a systemd service file with the same features as the current initv script.

Lucky commented on 2011-09-10 19:11

INFO:
If anyone want a separate datadir like kylef yet, use https://aur.archlinux.org/packages.php?ID=51772 (sabnzbd-git) by dryes.
Maybe with the next release i will change this, too.

CHANGES:
update the dependency "python-yenc" to "python2-yenc"
update to version 0.6.9

PACKAGE: http://hydra.lky.cc/lucky/pkgbuild/builds/sabnzbd/sabnzbd-0.6.9-1-any.pkg.tar.xz
SOURCE: http://hydra.lky.cc/lucky/pkgbuild/sources/sabnzbd/sabnzbd-0.6.9-1.src.tar.gz

cdemoulins commented on 2011-08-29 12:16

Hi, please update the dependency "python-yenc" to "python2-yenc". The package "python-yenc" will be deleted in two weeks.

Anonymous comment on 2011-08-15 20:46

@Lucky
builds and runs as expected, allows me to pass the --pause parameter for pausing on startup. It is a bit unusual to build the full command line in SABNZBD_ARGS, normally something like SABNZBD_ARGS is just appended to the hard-coded arguments (like setting the config file, etc.) inside of the init.d script, but it certainly works, and I suppose it's more flexible.

mrohnstock commented on 2011-08-15 20:28

@Lucky
works as expected. Thanks.

Lucky commented on 2011-08-15 00:21

@kylef
I will do this maybe later or Revelation60 does it. I did read your post from Sat, 09 Jul 2011 15:49:20.

does the my 0.6.8 package work without problems? I got 6 dls but no feedback.

kylef commented on 2011-08-14 23:09

Instead of making the sabnzbd user/group capable of editing and modifying the sabnzbd source code, it might be advisable to separate the datadir from the package dir in the next release.

Start sabnzbd with "-f /var/lib/sabnzbd/sabnzbd.ini" and make /var/lib/sabnzbd the homedir for sabnzbd user. /opt/sabnzbd then can be root:root while /var/lib/sabnzbd is sabnzbd:sabnzbd. The sabnzbd user really shouldn't be able to modify the static package data.

Lucky commented on 2011-08-14 09:59

@potatoe
Ahh this was my fault, because i forgot remove the post_upgrade (only for testing) line at the end of sabnzbd.install.
Also added SABNZBD_ARGS, have fun and please test it.

http://hydra.lky.cc/lucky/pkgbuild_sources/sabnzbd/sabnzbd-0.6.8-1.src.tar.gz

Lucky commented on 2011-08-14 09:58

@potatoe
Ahh this was my fault, because i forgot remove the post_upgrade (only for testing) line at the sabnzbd.install.
Also added SABNZBD_ARGS, have fun and please test it.

http://hydra.lky.cc/lucky/pkgbuild_sources/sabnzbd/sabnzbd-0.6.8-1.src.tar.gz

Anonymous comment on 2011-08-14 02:15

sabnzbd.install throws an error on a fresh install -- post_upgrade's "chown -R sabnzbd" seems to be running before post_install's "useradd sabnzbd" because it complains about "chown: invalid user: 'sabnzbd'".

Also, would it be possible to add a SABNZBD_ARGS variable to conf.d/sabnzbd which gets appended to the command line for sabnzbd in the init script? Most other init scripts with a conf.d file do seem to provide a PROGRAMNAME_ARGS option to pass custom command-line options to the daemon. I'd like to make sabnzbd start paused, which I believe is only possible via command-line options, not config files.

Lucky commented on 2011-08-06 10:00

Ahhh Revelation60 thanks for the info, i will change it.

Revelation60 commented on 2011-08-06 09:54

Thanks, Lucky! I've adapted most of your changes. Note that your version still had the old python-feedparser dependency (should be python2-feedparser).

Lucky commented on 2011-08-06 09:33

@Revelation60
I clean up your pkg and add more variables. maybe you want to merge something.
http://hydra.lky.cc/lucky/pkgbuild_sources/sabnzbd/sabnzbd-0.6.7-1.src.tar.gz
If you upload it to AUR and Sources are wrongly displayed replace pkgname="${_pkgname,,}" with pkgname=sabnzbd in the PKGBUILD

@Amarant
I added user/group support to post_upgrade, change /etc/conf.d/sabnzbd to your USER/GROUP combination.
defaults:
SABNZBD_USER="sabnzbd"
SABNZBD_GROUP="sabnzbd"

johnnyponny commented on 2011-08-04 19:16

0.6.7 is out. Works fine.

Anonymous comment on 2011-08-02 14:48

I don't run sabnzbd under the default sabnzbd user, so every time this package is updated I have to manually chown -R all the files. In order to fix this I would like the username that is specified in /etc/conf.d/sabnzbd to be used in the post_upgrade hook. So the post_upgrade function in sabnzbd.install would look like this:

post_upgrade() {
SABNZBD_USER=sabnzbd
. /etc/conf.d/sabnzbd
chown -R $SABNZBD_USER:$SABNZBD_USER /opt/sabnzbd
}

Anonymous comment on 2011-07-28 14:07

0.6.6 is out.

gee commented on 2011-07-24 01:07

In case anyone is interested here's my systemd service file:


[Unit]
Description=NZB grabber

[Service]
Type=simple
ExecStart=/usr/bin/sabnzbd
Restart=always
User=sabnzbd
Group=sabnzbd

[Install]
WantedBy=multi-user.target


It works just fine!

Revelation60 commented on 2011-07-10 15:02

I have fixed the dependency and I have added the removal of the group and the mime associations. The uninstall script also tries to close sabnzbd if it is running.

kylef commented on 2011-07-09 15:49

The "python-feedparser" dependency is incorrect, it should be "python2-feedparser", "python-feedparser" would be the python3 version. (See http://www.archlinux.org/packages/extra/any/python2-feedparser/ ). The install script doesn't cleanup properly, it creates a group but the group is never removed. Do (xdg-mime install) and (xdg-icon-resource install) also need to be removed on post_uninstall?

You could check the debian/ubuntu package out because they install sabnzbd in the FHS, /usr/bin/sabnzbdplus, /usr/share/sabnzbdplus/{interfaces,locale}/, etc. You can find the diff against the original sabnzbd source here: http://ppa.launchpad.net/jcfp/ppa/ubuntu/pool/main/s/sabnzbdplus/sabnzbdplus_0.6.5-0ubuntu1~jcfp1~oneiric.diff.gz

Anonymous comment on 2011-06-27 04:59

Try adding the user that runs sabnzbd to the 'power' group.

kevku commented on 2011-06-26 21:59

what do i need to do to make the suspend/shutdown on queue finish work?

Revelation60 commented on 2011-06-10 15:33

Forgot to submit. Done now :)

Lucky commented on 2011-06-10 15:16

No Problem Revelation60, but you didn't replace it. ;) but you don't need to raise up the pkgrel.

btw. You can also use ' instead of " quotes, but i like the " one ;)

Lucky commented on 2011-06-10 15:15

No Problem Revelation60, but you didn't replace it. ;) but you don't raise up the pkgrel.

btw. You can also use ' instead of " quotes, but i like the " one ;)

Revelation60 commented on 2011-06-10 13:14

I have updated sabnzbd and I've replaced the pkgbuild with your superior one, Lucky. Thanks!

Lucky commented on 2011-06-10 10:46

maybe you can made a rework of your PKGBUILD
change startdir to srcdir and pkgdir
change arch to any
and so on...

This is my Version of this PKGBUILD:
http://paste.geekosphere.org/hodr

Lucky commented on 2011-06-10 10:05

New Version SABnzbd v0.6.4
http://sourceforge.net/projects/sabnzbdplus/files/sabnzbdplus/sabnzbd-0.6.4/

gablink commented on 2011-06-03 10:40

Now everything is ok thanks :)

Revelation60 commented on 2011-06-02 16:44

Fix it now. Sorry, thought I'd fixed that before!

gablink commented on 2011-06-02 13:24

python2 command in /usr/bin/sabnzbd please! :(

Revelation60 commented on 2011-06-02 09:17

Good news! nzb file association is working now. This means you can open the nzbs from within the browser and downloading should start automatically. Don't forget to put the NZB KEY (in addition to the API key) in /etc/conf.d/sabnzbd.

@monty: fixed this too

mrohnstock commented on 2011-05-29 09:07

python2-fix in this package is not complete. /usr/bin/sabnzbd needs also the fix.

Anonymous comment on 2011-05-25 11:18

Looks like 0.6.2 was released.

psychedelicious commented on 2011-05-14 16:18

Can you make the sabnzbd script installed to /usr/bin/sabnzbd call python2 please?

Revelation60 commented on 2011-05-04 21:03

Updated to 0.6.0. To add nzb's by file association, a new key is needed. I'll see if I can add support for that.

Revelation60 commented on 2011-05-04 21:03

Updates to 0.6.0. To add nzb's by file association, a new key is needed. I'll see if I can add support for that.

johnnyponny commented on 2011-05-02 18:46

Works with 0.6.0RC2 as well. Great man :D

Revelation60 commented on 2011-04-06 17:12

Thanks! I had already tested it myself, but it's good to know that it works elsewhere too :)

Anonymous comment on 2011-04-06 16:49

I just used your PKGBUILD for 0.6.0RC1, and everything went smoothly, so the next release should be no problem I reckon. Just thought I'd let you know!

Revelation60 commented on 2011-03-03 11:26

Thanks LeCrayonVert, I'll check it out!

LeCrayonVert commented on 2011-03-03 11:24

Well I think you should take a look at how the lottanzb package manages the mime type, especially the following files (in the lottanzb package)

|-- lottanzb.applications.in
|-- lottanzb.desktop.in
|-- man
| `-- lottanzb.1
`-- mime
|-- lottanzb.keys.in
|-- lottanzb.mime.in
`-- lottanzb.xml.in

LeCrayonVert commented on 2011-03-02 21:36

And regarding the script, it seems it just call "addnzb" , so it will not start the sabnzbd daemon....but if it is running, and IF you pass an nzb file as an argument, it will be added to the download list. So pretty useless in the gnome menus (you can't pass argument)...So I guess this .desktop file is only to be use with the "open with" function of your file manager.

LeCrayonVert commented on 2011-03-02 21:32

Revelation60 > I still can't see that icon because you should NOT put an absolute path to the icon (/opt/...) but just the basename of it (without the extension .png) and put the PNG file in /usr/share/pixmaps/ by adding a line in the PKGBUILD ;)

Revelation60 commented on 2011-02-20 12:07

I've added an icon for sabnzbd and for the .nzb files. :) The script to automatically load nzbs into sab when clicked still doesn't work correctly. Could someone have a look at that?

LeCrayonVert commented on 2011-02-17 20:07

There is no icon in the gnome menu entry for sabnzbd+ ...
Could you please add an icon and put Icon=xxxxxxx in the desktop file ?
Thx ;)

Revelation60 commented on 2011-01-31 09:13

The idea behind that is that you know for certain that the stop IP and port is correct. If I were to remove this and you would change the IP and port in sabnzbd and not in the config file, the call to the shutdown script would fail.

Anonymous comment on 2011-01-31 09:07

Oh I get the need to use the IP and port settings (set in /etc/conf.d/sabnzbd) to STOP the daemon. What I don't understand is why we use them to START the daemon. The way it is now, this doesn't allow you to change the IP from within sabnzbd, it always changes back when you restart the daemon. By the way, I noticed that you actually can use 0.0.0.0 as $SABNZBD_IP and it is still able to stop properly using the rc script. So my whole reason to make a comment is kind of void :)

Revelation60 commented on 2011-01-31 08:54

The IP and port are used to shutdown sabnzbd. I think it is really unfortunate too that the best way to shutdown sabnzbd is through the web api instead of through calling the python file. If the last were possible, the whole configuration file could be removed.

Anonymous comment on 2011-01-30 22:40

I was wondering why the rc script sets the IP and port when starting the daemon? It doesn't really serve a purpose as far as I can tell? The IP and port are set in sabnzbd.ini anyway. The way it is now, I couldn't set the IP to 0.0.0.0 (which I need to to, because I need to access from localhost AND remote) using the $SABNZBD_IP variable, because then the stop script doesn't work (kind of hard to send a command to 0.0.0.0 :-) ). I just removed '-s $SABNZBD_IP:$SABNZBD_PORT' from the start script. Now I can set the IP to what I want in the General config of sabnzbd, and I just leave the $SABNZBD_IP set to 127.0.0.1. This seems like the most logical to me? I'm no expert by any means, so please correct me if I'm missing something!

Revelation60 commented on 2011-01-26 09:53

Ah I see, the package has been renamed because pyopenssl is for python 3.1 now. I'll fix the package.

Anonymous comment on 2011-01-25 23:53

I had to install python2-pyopenssl to get it working with ssl.

teek commented on 2011-01-06 21:43

Well, got it all nice and working now, made myself the user in /etc/conf.d/sabnzbd and "chown -R myself /opt/sabznbd" to prevent "can't write logs" -errors.

I find it pretty hard to configure a standalone, boot up starting sabnzbd! Hope all my comments will help someone.

teek commented on 2011-01-06 21:07

Strangely it also overwrites the folders I define (for monitoring, complete etc.) when using the startup script.

teek commented on 2011-01-06 20:56

Ok, thanx for the info :) To be honest I was complaining based on older observations, when I opened /etc/con.d/sabnzbd instructions were right there. Although it asks for the API key, not the session key which had me a bit confused at the start (but not for long ;) ).

Another tip, if you want sabnzbd to be accessible from other computers you will be told to change the "host" value, in my case it worked by choosing this to be the same as the actual IP. You can change this in the web interface and in /opt/sabnzbd/sabnzbd.ini but it will revert on every boot... until you set SABNZBD_IP="xxx.xxx.xxx.xxx" to the IP you want for the "host" value.

Just putting it here to prevent other from looking as long as me :)

Good work, keep it up!

Revelation60 commented on 2011-01-06 09:08

The session key is there to prevent a certain web exploit: http://secunia.com/advisories/34537/. The session key can be found under Config -> General if I remember correctly. The key has to be addded to /etc/conf.d/sabnzbd because I use an API command to shut down sabnzbd. Without the key, that won't work.

Maybe I can find another way to shut it down, using the python file. That way, the session key won't be needed.

teek commented on 2011-01-06 07:53

Am I the only one that wonders what a session-key does, where to get it and why we need it? Why doesn't it just work?

Anonymous comment on 2010-11-16 00:46

If you edit /etc/conf.d/sabnzbd and insert the relevant data, the stop/start script that comes with the package works fine

Anonymous comment on 2010-11-10 12:19

Ok, I've fixed stopping the daemon... /etc/rc.d/sabnzbd needs to be edited so that it's at follows...

stop)
stat_busy "Stopping SABnzbd"

curl -f "$SABNZBD_PROTOCOL://$SABNZBD_USPW$SABNZBD_IP:$SABNZBD_PORT/sabnzbd/api?mode=shutdown&apikey=$SABNZBD_KEY" &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
pkill -f "python2 /opt/sabnzbd/SABnzbd.py"
rm_daemon sabnzbd
stat_done
fi
;;


All i've done is add the line:
pkill -f "python2 /opt/sabnzbd/SABnzbd.py"

Anonymous comment on 2010-11-10 11:39

Hi, I'd like to mention that the stop and restart commands for the daemon aren't actually stopping the sabnzbd process.

Revelation60 commented on 2010-11-07 22:15

Yeah, of course. I accidentally used an old version of the PKGBUILD which didn't have that yet and I overlooked. Thanks!

Anonymous comment on 2010-11-07 21:59

Wouldn't it be relevant to change the dependencies in the PKGBUILD from python to python2?

Revelation60 commented on 2010-11-07 21:02

I've updated the package to 0.5.5 and I've added the sed command. I had my doubts at first whether to change the package itself, but it seems like we don't really have a choice.

kevku commented on 2010-11-07 18:47

0.5.5 is out

mhellwig commented on 2010-10-29 15:54

@MyWorld: well yeah, I already did, I'm just saying the package should be fixed ..

MyWorld commented on 2010-10-29 08:17

If you get the python error:
sabnzbd
File "/opt/sabnzbd/SABnzbd.py", line 20
print "Sorry, requires Python 2.4 or higher."

Just amend the startup script:
nano /usr/bin/sabnzbd

Change
python /opt/sabnzbd/SABnzbd.py -f $HOME/.sabnzbd.ini "$@"

To
python2 /opt/sabnzbd/SABnzbd.py -f $HOME/.sabnzbd.ini "$@"

mhellwig commented on 2010-10-28 14:11

exactly ..
as in:
/usr/bin/sabnzbd calls python instead of python2

also I'm not sure about all the .py-files in /opt/sabnzbd .. all the ones that have a
#!/usr/bin/python line at the top should be #!/usr/bin/python2
no?

would be a simple sed in the PKGBUILD ..

psychedelicious commented on 2010-10-28 03:42

please patch the sabnzbd file to use python2 too. I run sabnzbd by running the command 'sabnzbd' in a terminal. Thanks.

Revelation60 commented on 2010-10-27 18:58

I am afraid I don't understand. This version calls python2:

su - $SABNZBD_USER -c "python2 /opt/sabnzbd/SABnzbd.py -f $SABNZBD_CONF -s $SABNZBD_IP:$SABNZBD_PORT -d" -s /bin/sh

mhellwig commented on 2010-10-27 18:52

aaagh I had my old version patched to call python2 and now this "new" version again calls python?

have to go back across everything, damn.

Revelation60 commented on 2010-10-24 18:39

I've updated the package and fixed a bug concerning file associations. That still doesn't work as well as I'd wish (for example with files containing spaces), so if someone with more bash skills can take a look at that, that would be great :)

Anonymous comment on 2010-10-22 15:55

Fresh arch install a few days ago, so have python3.. I just changed python to python2 in the init script (line 15), seems to be working fine. Assuming you have python2 installed.

Revelation60 commented on 2010-10-20 18:35

I am on a trip in the us now, so sorry for the late reaction. I will try to fix it tonight, but I may not be able to get to a decent workstation until monday. Sorry!

mhellwig commented on 2010-10-20 18:27

due to the Big Python Rebuild this package REALLY should be updated asap to change all calls to python to python2 instead. Of course one can do that manually but it is a bit annoying

Anonymous comment on 2010-10-19 19:53

Thank you gee. Your suggestion fixed the problem.

Anyone needing any extra help just edit the file gee mentioned in a text editor (with root privileges) and change the python tag to python2.

gee commented on 2010-10-10 22:09

I have an issue now as it defaults to python 3 and not python 2 and then cannot start.
If I change the script in /usr/bin/sabnzbd to use explicitly python2 it works like before...
Can you add that to the package?

Thanks

Revelation60 commented on 2010-09-10 06:50

You're absolutely right. Sorry for the typo, I will fix it as soon as possible.

wilson commented on 2010-09-09 22:45

I had to change the curl line in the init file from ?apikey to &apikey to make it shutdown properly. Otherwise it was giving me the error "error: API Key Required", which has an exit status of 0 and so stat_fail doesn't catch it.

Revelation60 commented on 2010-09-03 17:54

Okay, I have made some changes. The first is a better way to shut down sabnzbd using the API and the other is file association with nzb files. So from now on you can just click on .nzb files (or use xdg-open) and the nzb will automatically be loaded into sabnzbd.

Revelation60 commented on 2010-08-27 16:10

As you may have noticed, I am the new package maintainer. I have updated sabnzbd to version 0.5.4 and I have implemented some of your suggestions, such as UlyssesNL's fix to support proper shutdowns on password protected sabnzbd instances. I also added a protocol variable to the configuration file, so if you use https you are able to shutdown correctly.

Malstrond commented on 2010-08-26 02:50

SABnzbd 0.5.4 has been released.

Vintendo commented on 2010-08-01 01:02

I have a few comments on this package, first off all the /opt thing is a bad one. PKGBUILDS should never acces the actual file system. Secondly, the conf.d and rc.d script overwrite the config file for server address. I think this is very bad and sabnzbd should be closed down hard anyways because when you have a password protected sab it doesnt work... please fix this.

I have flagged this out-of-date to notify you, I hope you dont mind.

Vintendo commented on 2010-08-01 01:02

I have a few comments on this package, first off all the /opt thing is a bad one. PKGBUILDS should never acces the actual file system. Secondly, the conf.d and rc.d script overwrite the config file for server address. I think this is very bad and sabnzbd should be closed down hard anyways because when you have a password protected sab it doesnt work... please fix this.

amkan13 commented on 2010-07-12 14:48

on a fresh install i get the error "find: `/opt/sabnzbd': No such file or directory"
but /opt/sabnzbd shouldn't exist because i have not installed it before

hyness commented on 2010-07-10 13:20

@VuDu: was your comment directed at me or the package maintainer? All I did was move that rm from the PKGBUILD to an install file so I could install the latest version. I agree that it should not be necessary.

Anonymous comment on 2010-07-09 13:26

"find /opt/sabnzbd -name "*" -type f -not \( -name sabnzbd.ini \) -exec rm -rf {} \;" -> this seems wrong. There should be no need to manually delete previous installed files.

hyness commented on 2010-07-09 12:50

To fix the problem with the PKGBUILD trying to remove files, I commented out that line and created a sabnzbd.install file with these contents...

pre_install() {
find /opt/sabnzbd -name "*" -type f -not \( -name sabnzbd.ini \) -exec rm -rf {} \;
}

You can also use the --asroot option, but really this PKGBUILD should be fixed with an install file because the build shouldn't modify any files

Revelation60 commented on 2010-07-03 08:34

It fails here because I don't have the rights to remove files from /opt/sabnzbd.

ben-arch commented on 2010-07-03 03:20

Just installed, seems OK.

Thank you

farhany commented on 2010-07-02 13:33

OK folks, new PKGBUILD. I made both backup entries relative. Tell me if there is a problem.

Anonymous comment on 2010-07-02 11:37

I'm also having that problem:
==> ERROR: Invalid backup entry : /etc/conf.d/sabnzbd
==> ERROR: Makepkg was unable to build sabnzbd.

but from http://wiki.archlinux.org/index.php/PKGBUILD :
backup
An array of files to be backed up as file.pacsave when the package is removed. This is commonly used for packages placing configuration files in /etc. The file paths in this array should be relative paths (e.g. etc/pacman.conf) not absolute paths (e.g. /etc/pacman.conf).

Revelation60 commented on 2010-07-02 08:33

@farhany: you should remove the / before /etc/conf.d/sabnzbd. The backup entries are referring to the locations in the package, not to the file system itself.

farhany commented on 2010-07-02 00:14

Fresh build here, please let me know if there's a problem.

Malstrond commented on 2010-07-01 23:46

I'm always getting
ERROR: Invalid backup entry : /etc/conf.d/sabnzbd
when using this PKGBUILD. I have to remove the backup entries.

Revelation60 commented on 2010-06-28 08:03

wilcoxjay, I used the same patch, but I removed opt/sabnzbd/sabnzbd.ini from backup, since it complained.

Anonymous comment on 2010-06-27 22:13

this straightforward patch to the PKGBUILD brought 0.5.3 in with no problems. http://aur.pastebin.com/vGtXpDsP

Anonymous comment on 2010-06-06 09:05

Having sabnzbd in my user groups, make me to be able to navigate in the /opt/sabnzbd directory as a user. But it doesn't permit sabnzbd to use my home folders. It's weird that i am the only one wanting to use my home directory...i've found anything on the official website...

Revelation60 commented on 2010-06-05 13:17

Well, it shouldn't make a difference if you use gpasswd. Anyway, if you have sabnzbd as a user for sabznbd, you should add sabnzbd to your usergroup celos. That way sabnzb can access your folder. In theory, but I see it isn't working :(

Anonymous comment on 2010-06-05 12:25

hmm with usermod, i think it should be sudo usermod -aG sabnzbd celos, but i did it with gpasswd: sudo gpasswd -a celos sabnzbd. Still doesn't work ...

Revelation60 commented on 2010-06-05 10:29

I think you are doing the opposite :P Try something like sudo usermod -aG celos sabnzbd.

Anonymous comment on 2010-06-05 10:22

I added the user to the sabnzbd and did'nt work (after restarting the user session), still can't create directories in the home folder.

Revelation60 commented on 2010-06-05 09:56

No, it is the other way around. If you edit that, you have to chmod everything in /opt/sabnzbd. But I see you want to download things to your home folder. I am guessing the group sabnzbd does not have the rights to access that folder. Maybe it's best if you add sabnzbd to your user group?

Revelation60 commented on 2010-06-05 09:56

No, it is the other way around. If you edit that, you have to chmod everything in /opt/sabnzbd. But I see you want to download things to your home folder. I am guessing the group sabnzbd does not have the rights to access that folder. Maybe it's best if you sabnzbd to you use group?

Anonymous comment on 2010-06-05 09:53

Ok, I didn't know about that file. It is SABNZBD_USER="sabnzbd", if I modify this to SABNZBD_USER="celos", i'll be able to modify directories folder to /home/celos/videos for example ?

Revelation60 commented on 2010-06-05 09:28

Did you edit the sabnzbd.confd file? If you leave the line SABNZBD_USER="sabnzbd" unmodified, it should work.

Anonymous comment on 2010-06-05 09:25

If i run sabnzbd as a daemon using /etc/rc.d/sabnzbd start , i can't modify directories folder, it seems i don't have the rights...even if i modify in sabnzbd.ini file, anyone as the same problem ? thx

teek commented on 2010-05-28 07:28

Ah, yes, I see now... thanx, it works now :s

Revelation60 commented on 2010-05-25 08:41

As I said in my previous post, it is required to delete the sabnzbd folder. If you don't old python files will remain on the filesystem and will still be loaded into sabnzbd. This will cause conflicts.

teek commented on 2010-05-25 08:24

Build and installed all dependencies again... same errors.

teek commented on 2010-05-25 07:36

I get eroors with the latest version... any suggestions?

[me@mybox ~]$ sabnzbd
Traceback (most recent call last):
File "/opt/sabnzbd/SABnzbd.py", line 63, in <module>
import sabnzbd
File "/opt/sabnzbd/sabnzbd/__init__.py", line 66, in <module>
import sabnzbd.nzbqueue as nzbqueue
File "/opt/sabnzbd/sabnzbd/nzbqueue.py", line 37, in <module>
import sabnzbd.assembler
File "/opt/sabnzbd/sabnzbd/assembler.py", line 40, in <module>
import sabnzbd.postproc
File "/opt/sabnzbd/sabnzbd/postproc.py", line 41, in <module>
import sabnzbd.emailer as emailer
File "/opt/sabnzbd/sabnzbd/emailer.py", line 212, in <module>
from email.message import Message
ImportError: No module named message

ben-arch commented on 2010-05-23 16:34

Thank you

Anonymous comment on 2010-05-04 19:33

I always have the problem that when i use a username and password to login, the daemon either doesnt start or doesnt stop using the default scripts (when you do add the username and pass it doesnt start if you dont add it it doesnt stop).

I manually apply the changes to the scripts everytime but maybe you can update the package.
Below you can see what i changed in the scripts.

conf.d

SABNZBD_USER="sabnzbd"
SABNZBD_CONF="/opt/sabnzbd/sabnzbd.ini"

# Put the session key from Config > General here
SABNZBD_KEY="0ed6ebaab38d00260213f31ee8ff7b2e"

# Set to the IP and port sabnzbd is listening on
# This is needed to stop sabnzbd properly
# If you use a username and password to access sabnzbd use "user:pass@ip"
SABNZBD_IP="127.0.0.1"
SABNZBD_PORT="8080"
SABNZBD_USPW="user:pass@"


init
#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/sabnzbd

case "$1" in
start)
stat_busy "Starting SABnzbd"

if [ -f /var/run/daemons/sabnzbd ]; then
echo -n "Sabnzbd is already running as a daemon!"
stat_fail
else
su - $SABNZBD_USER -c "python /opt/sabnzbd/SABnzbd.py -f $SABNZBD_CONF -s $SABNZBD_IP:$SABNZBD_PORT -d" -s /bin/sh
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon sabnzbd
stat_done
fi
fi
;;
stop)
stat_busy "Stopping SABnzbd"

curl -f http://$SABNZBD_USPW$SABNZBD_IP:$SABNZBD_PORT/sabnzbd/shutdown?session=$SABNZBD_KEY &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon sabnzbd
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0

Anonymous comment on 2010-05-04 13:14

Thanks Revelation60 and farhany. Used these files with updated PKGBUILD from Revelation and 5.2 install went great. No issues.

farhany commented on 2010-05-04 04:13

New build coming up soon as I get my virtual arch installation working.

Revelation60 commented on 2010-05-03 10:13

Here is the PKGBUILD for the latest version: http://aur.pastebin.com/RJhTu7Tg.

Remember to completely remove the sabnzbd dir before installing!