I was wondering if it was possible to pause sabnzbd from the commandline on linux?
The reason I ask is because I use a lot of rssfeeds for downloading and I like playing ps3, downloading and playing online games don't really match so i made a script that pings my ps3 to see if it runs and if so it stops sabnzbd (/etc/rc.d/sabnzbd stop), although that works it would probably be nicer if I could pause downloading instead of stopping sabnzbd altogether, any suggestions?
Pauze sabnzbd from commandline?
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Re: Pauze sabnzbd from commandline?
Use an API call with wget or curl
You can find the APIKEY in Config->General
There's some documentation about the API here:
http://wiki.sabnzbd.org/api
Code: Select all
curl http://localhost:8080/api?mode=pause&apikey=APIKEYThere's some documentation about the API here:
http://wiki.sabnzbd.org/api
Re: Pauze sabnzbd from commandline?
Thanks shypike that worked great!
Re: Pauze sabnzbd from commandline?
hello,shypike wrote:Use an API call with wget or curlYou can find the APIKEY in Config->GeneralCode: Select all
curl http://localhost:8080/api?mode=pause&apikey=APIKEY
There's some documentation about the API here:
http://wiki.sabnzbd.org/api
I'm not as lucky as beukie, as i tried many commands & didn't succeed...
I'm a newbie with linux, so I copied what shypike wrote, and I tried :
Code: Select all
>>wget http://localhost:8080/api?mode=pause&apikey=<APIKEY>
>> --17:13:16-- http://localhost:8080/api?mode=pause
=> `api?mode=pause'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24 [text/plain]
api?mode=pause: Permission denied
Cannot write to `api?mode=pause' (Permission denied).
Code: Select all
>> wget http://localhost:8080/sabnzbd/api?mode=pause&apikey=<APIKEY>
>> --17:13:45-- http://localhost:8080/sabnzbd/api?mode=pause
=> `api?mode=pause'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24 [text/plain]
api?mode=pause: Permission denied
Cannot write to `api?mode=pause' (Permission denied).
Code: Select all
>> wget http://localhost:8080/sabnzbd/api?mode=auth
--17:14:15-- http://localhost:8080/sabnzbd/api?mode=auth
=> `api?mode=auth'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7 [text/plain]
api?mode=auth: Permission denied
Cannot write to `api?mode=auth' (Permission denied).
Code: Select all
>> curl http://localhost:8080/sabnzbd/api?mode=auth
apikey
>> curl http://localhost:8080/sabnzbd/api?mode=pause&apikey=<APIKEY>
>> error: API Key Required
>>- it seems that the authentication mode is "apikey"
- but i can't do anything as if i didn't give the apikey !
and I can't desactivate the api key on the config/general page (it says "failure")
I don't understand what i'm doing wrong...
a huge thank you very much in advance for your help !
kind regards,
Re: Pauze sabnzbd from commandline?
Curl works a bit different:
Code: Select all
curl http://localhost:8080/sabnzbd/api -F apikey=APIKEY -F mode=pause
Re: Pauze sabnzbd from commandline?
Isn't this about not using single quotes? Examples how to use it:
Code: Select all
sander@flappie:~$ wget 'http://localhost:8080/api?mode=pause' -o /dev/null -O-
ok
sander@flappie:~$Code: Select all
sander@flappie:~$ lynx --dump 'http://localhost:8080/api?mode=pause'
ok
sander@flappie:~$Code: Select all
sander@flappie:~$ curl 'http://localhost:8080/api?mode=pause'
ok
sander@flappie:~$Re: Pauze sabnzbd from commandline?
Without proper quoting, the & would background the process and the remainder of the url (i.e., the api key) no longer send to sab. There would have been indications in the output pointing to all that though, I guess weybfr was posting only very selective parts.
Re: Pauze sabnzbd from commandline?
hi everyone !sander wrote:Isn't this about not using single quotes? Examples how to use it:
...
Code: Select all
sander@flappie:~$ curl 'http://localhost:8080/api?mode=pause' ok sander@flappie:~$
yes it worked with the quotes !
i didn't try the other proposed solutions as this one worked fine for me !
@jcfp : no i didn't post very selective parts of the output, i only hid my apikey...
so ?
i'll try to remember that the "&" would background the process !
thank you very much everybody for your quick help !
kind regrds
weybfr

