Page 1 of 1
How to send pause command via a bash script?
Posted: July 1st, 2008, 6:00 am
by habskilla
Not a sabnzbd question but a linux question.
If i enter this,
http://my url/sabnzbd/api?mode=pause, into a browser it will pause sabnzbd.
The question I have is how can I do the pause command from a bash script?
I've tried wget -q
http://my url/sabnzbd/api?mode=pause but that just creates a file called "api?mode=pause"
Re: How to send pause command via a bash script?
Posted: July 1st, 2008, 7:32 am
by shypike
How about:
Code: Select all
wget -q --delete-after "http://host:port/sabnzbd/api?mode=pause"
Without the quotes, bash will think that the '?' is a wild-card.
Re: How to send pause command via a bash script?
Posted: July 1st, 2008, 3:09 pm
by habskilla
doesn't work
Re: How to send pause command via a bash script?
Posted: July 1st, 2008, 3:16 pm
by rAf
try this :
Code: Select all
curl "http://host:port/sabnzbd/api?mode=pause"
Re: How to send pause command via a bash script?
Posted: July 1st, 2008, 3:41 pm
by shypike
habskilla wrote:
doesn't work
I'm sorry, but the
wget works fine on my Ubuntu-8.04 server box.
(and
curl too).
Re: How to send pause command via a bash script?
Posted: July 2nd, 2008, 8:38 am
by habskilla
Found the solution. The reason it wasn't working was because of lack of authorization. From the wiki advanced options I found the solution.
Code: Select all
wget -q --delete-after "http://localhost:8080/sabnzbd/api?mode=resume&ma_username=user&ma_password=password"
Re: How to send pause command via a bash script?
Posted: July 2nd, 2008, 10:01 am
by shypike
OK, I had not thought of the username/pw either, since it's optional.