-
charlie00
- Harmless
- Posts: 3
- Joined: Thu Sep 08, 2011 9:07 am
Post
by charlie00 »
Hi!
I´m trying to get my linux box to send me a notification when a download is completed.
In .rtorrent.rc I have the following line
Code: Select all
system.method.set_key = event.download.finished,notify_me,"execute=~/sendNotification.sh,$d.get_name="
And I have a script sendNotification.sh with the following lines.
Code: Select all
#!/bin/sh
API_KEY="MYKEY"
SUBJECT="Download completed"
MESSAGE=$1
curl -d "apikey=$API_KEY&application=rTorrent&event=$SUBJECT&description=$MESSAGE" https://api.prowlapp.com/publicapi/add
Anyone got any idea what´s wrong with the code?
-
zac
- Cocoaforge Admin
- Posts: 1518
- Joined: Sun Mar 27, 2005 3:19 pm
-
Contact:
Post
by zac »
Are you getting an error? The following curl command works for me:
Code: Select all
curl https://prowlapp.com/publicapi/add -F apikey=myAPIKey -F application=test -F event=test2 -F description=test3
-
charlie00
- Harmless
- Posts: 3
- Joined: Thu Sep 08, 2011 9:07 am
Post
by charlie00 »
That curl line works for me aswell, but I can't get any notification from rtorrent with my script for some reason..any idea?
Edit: Nevermind, It was a typo *of course* . The code works :-)
-
dkjf
- Harmless
- Posts: 1
- Joined: Fri Aug 31, 2012 3:18 pm
Post
by dkjf »
where is the "typo", i am trying the same, but I can't find the mistake in your code
