Transmission script

Transmission script

Postby karainier » Wed May 28, 2014 7:27 pm

Hello,

I am trying to get transmission to call a script when it completes a torrent. The script runs under root user but not as tr-daemon. permissions are set as:

drwxr-xr-x root root .
drwxr-xr-x root root ..
-rwxr-xr-x root root script.sh

I can't tell if transmission is unable to call the script due to a permissions issue or if something in the script is failing once called. Where is the syslog located so i can see the call?
karainier
 
Posts: 25
Joined: Sun Apr 13, 2014 9:01 pm

Re: Transmission script

Postby fvdw » Thu May 29, 2014 7:24 pm

the syslog is in /var/log/messages , but it will be empty as long as debug mode is not set. Furthermore I think you will not find something in syslog when this script doesn't run.

there is no user tr-daemon, and why do you want to run it under that username ?

to check if your script runs let it make a test file (include a command like "link /share/1000/public/test.txt") and check if it is created

ps. shell scripts containing <CR><LF> at end of line (dos syntax) will not work on linux, you need to use unix format only <LF>
This will happen when you created a shell script using a editor under windows like notepad.
Use an appropriate editor to make you shell script and save it in unix format.
To check if your command file doesn't has this wrong syntax an editor like notepad++ can be very helpful
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Transmission script

Postby karainier » Thu May 29, 2014 7:29 pm

I mean that it is called by the daemon so runs as "nobody" correct?
karainier
 
Posts: 25
Joined: Sun Apr 13, 2014 9:01 pm

Re: Transmission script

Postby karainier » Thu May 29, 2014 7:43 pm

What is the command to manually run tr daemon? With logging enabled?
karainier
 
Posts: 25
Joined: Sun Apr 13, 2014 9:01 pm

Re: Transmission script

Postby karainier » Mon Jun 02, 2014 7:43 pm

Thanks for the tip on formatting, I use notepad ++ or vi for most everything.
I ran the tr-daemon with debug log and in foreground, found an error in my script setting a path to a log file, its working fine now. It was never a problem with tr-daemon. Thanks again for your support :).
karainier
 
Posts: 25
Joined: Sun Apr 13, 2014 9:01 pm


Return to Development

Who is online

Users browsing this forum: No registered users and 12 guests