0

I am trying to get a script working from here : https://gist.github.com/vor0nwe/e33ace72c850f93bc979/

#!/bin/bash

curl -u YOUR_ACCESS_TOKEN: \
-X POST https://api.pushbullet.com/v2/pushes \
--header 'Content-Type: application/json' \
--data-binary '{"type":"note","title":"Downloaded","body":"$TR_TORRENT_NAME: $TR_TIME_LOCALTIME"}'

on my zyxel325 nas but every time I get this message :

{"error":{"type":"invalid_request","message":"Failed to decode JSON body.","cat":"(=^‥^=)"}}

I tried putting the "$TR_TORRENT_NAME: $TR_TIME_LOCALTIME" in double "" but it did not help.

If someone could help I would be grateful. Cheers

Viktor Mellgren
  • 4,318
  • 3
  • 42
  • 75
  • Does it work if you don't use "$TR_TORRENT_NAME: $TR_TIME_LOCALTIME" but just put "hello" there instead? – Chris Pushbullet Mar 24 '15 at 08:49
  • Then it works but I tried it from cmd line. What does it mean? – majin vegetto Mar 25 '15 at 00:23
  • But the script is not being executed by transmission. – majin vegetto Mar 25 '15 at 02:42
  • I have an update. After deleting the back slash from the end of Content-Type: application/json' \ the whole script works. Now it the problem is that the Transmission is not executing it despite the fact that in the log it "calls the script". – majin vegetto Mar 28 '15 at 01:38
  • Ok I managed to resolve the problem. There were probably 2 issues: 1) instead of bin/bash command I had to change to bin/sh 2)changed the file formating from dos to unix (ASCII) – majin vegetto Mar 30 '15 at 01:51

0 Answers0