Jump to content

[bug] "Run Program" don't work


ceafdc

Recommended Posts

Hi, I'm using µTorrent Server alpha (3.0 build 27079) installed on Debian and Ubuntu 12.04 both on 32bit

The option to run a program when a torrent finishes or change state doesn't work. I've tested on the two servers mentioned above and it doesn't work on both. And sometimes gives a segmentation fault on utserver and it needs to be restarted.

Hope to be helpful to other users.

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

I can confirm on the same build on a fedora 17 machine there are definitely issues.

Something like the following in "Run Program":

/home/user/Scripts/simpleunrar.sh "%D"

the script runs and uTorrent server says:

Executing: /home/user/Scripts/simpleunrar.sh "/media/HardDrive/YourCurrentTorrent"

The script echo's its commands so I know it is running but utorrent wont pass it it's arguments.

calling the script from the command line works fine but when called from utorrent it never sees the

"/media/HardDrive/YourCurrentTorrent"

So again there are diffidently issues with the Run Program, I have tried every permeation of quotes:

"/home/user/Scripts/simpleunrar.sh %D"

"/home/user/Scripts/simpleunrar.sh" "%D"

/home/user/Scripts/simpleunrar.sh %D

"/home/user/Scripts/simpleunrar.sh" %D

But that %D never makes it to the script. Which works fine from command line.

You can test it with a script as simple as:

#!/bin/bash

set -x

echo "You Want This: \""$1"\""

And it will only ever output:

You Want This: ""

Perhaps our issues are related in some way. Anyone that would like to share any information on how to get an argument to a bash script from this interface can feel free to chime in.

Thank you.

Link to comment
Share on other sites

I can confirm on the same build on a fedora 17 machine there are definitely issues.

Something like the following in "Run Program":

/home/user/Scripts/simpleunrar.sh "%D"

the script runs and uTorrent server says:

Executing: /home/user/Scripts/simpleunrar.sh "/media/HardDrive/YourCurrentTorrent"

The script echo's its commands so I know it is running but utorrent wont pass it it's arguments.

calling the script from the command line works fine but when called from utorrent it never sees the

"/media/HardDrive/YourCurrentTorrent"

So again there are diffidently issues with the Run Program, I have tried every permeation of quotes:

"/home/user/Scripts/simpleunrar.sh %D"

"/home/user/Scripts/simpleunrar.sh" "%D"

/home/user/Scripts/simpleunrar.sh %D

"/home/user/Scripts/simpleunrar.sh" %D

But that %D never makes it to the script. Which works fine from command line.

You can test it with a script as simple as:

#!/bin/bash

set -x

echo "You Want This: \""$1"\""

And it will only ever output:

You Want This: ""

Perhaps our issues are related in some way. Anyone that would like to share any information on how to get an argument to a bash script from this interface can feel free to chime in.

Thank you.

Hi,

I ran into this problem a long time ago. I found that the first substitution variable get's "thrown away". I used some verbose "debugging" & logging with my scripts to find out what was going on.

Try doubling your first variable. For example, try this. (I found I had to use double quotes around the variables too.)

/home/user/Scripts/simpleunrar.sh "%D" "%D"

Hope that helps!

Regards!

:cool: :D

Link to comment
Share on other sites

Hi,

I ran into this problem a long time ago. I found that the first substitution variable get's "thrown away". I used some verbose "debugging" & logging with my scripts to find out what was going on.

Try doubling your first variable. For example, try this. (I found I had to use double quotes around the variables too.)

/home/user/Scripts/simpleunrar.sh "%D" "%D"

Hope that helps!

Regards!

:cool: :D

Very very nice. I can confirm that this workaround actually works. Thank you!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...