transmission-remote

transmission-remote

Postby matigev » Fri Dec 30, 2011 12:03 am

I'm currently working on a script that runs after a torrent is done.
My problem is transmission-remote doesn't output anything.
If I try transmission-remote -n user:pass -l when SSHing to my NAS I only get some message with: " SUCCESS!"
I googled my ass off and I only found some RPC-related thing, but I'm quite stuck at what to do.
When I add the --debug to it, I can see the output, but I can't pipe it to a file.

Differrent problem:
When I use transmissions script-after-done option, it gives me the torrent id, but when I put for example transmission-remote -n user:pass -t ID --remove
it doesn't remove the torrent at all with no errors in my log.
When I do it manually, with SSH, it DOES work...
My testscript (currently hit-and-run script ;) I will be adding some sleep() to it):
Code: Select all
# !/bin/sh
# posttorrent script
# Log file, file where we tell what events have been processed.
LOG_FILE="/share/1000/tr-downloads/log/posttorrent.log"
NOW=$(date +%Y-%m-%d\ %H:%M:%S)
echo $NOW "Finished $TR_TORRENT_NAME" >> $LOG_FILE
transmission-remote -n admin:***** -t $TR_TORRENT_ID --remove >> $LOG_FILE
echo $NOW "Torrent $TR_TORRENT_NAME met id: $TR_TORRENT_ID verwijderd..." >> $LOG_FILE
# chmodding for samba
chmod -R 777 /share/1000/tr-downloads


Also the logfile is saved as posttorrent.log?? not as posttorrent.log.
The weird thing is everything works except for the transmission-remote....
When I just do : transmission-remote >> $LOG_FILE, it DOES output the help information in my log...
Any ideas someone? Is transmission-daemon runned as root?
matigev
Donator VIP
Donator VIP
 
Posts: 48
Joined: Fri Sep 30, 2011 7:52 pm
Location: NL

Re: transmission-remote

Postby fvdw » Fri Dec 30, 2011 7:34 am

Be sure the command file is unix type (so only new line feed at end and not carriage return+linefeed as for instance notepad does). If not it might not execute some commands
Furthermore it might be possible that the output of transmission remote log is sent to the error device instead of standard ouput (screen) then use
Code: Select all
your-command 2>> logfile

Notice that there must be no space between the 2 and >>

more info that might be helpful you can find for instance here http://www.codecoffee.com/tipsforlinux/ ... 2/042.html
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: transmission-remote

Postby matigev » Sat Dec 31, 2011 2:02 am

Thanks for your reply.
Still transmission remote does not list my torrents. Even using the 2...

I will try saving my script from a linux box, it explains the question marks at the end of the filename
matigev
Donator VIP
Donator VIP
 
Posts: 48
Joined: Fri Sep 30, 2011 7:52 pm
Location: NL


Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 8 guests