Script not being executed (weird problem)

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
Ortix
Posts: 28
Joined: Wed Nov 18, 2009 2:03 am

Script not being executed (weird problem)

Post by Ortix »

I'm trying to find what is preventing my script to be executed propperly.

I have a script in /var/www/vhosts/animekyun.com/etc/upload.sh
I put this in the settings.json file. Now when I run transmission-daemon -f I can see what's happening.

[13:36:51.202] test.zip Calling script "/var/www/vhosts/animekyun.com/etc/upload.sh" (torrent.c:1909)

and then it stops for a while (minute or two?)

And tells me this:

[13:37:14.225] Port Forwarding State changed from "Starting" to "???" (port-forwarding.c:93)

My upload.sh script contains this for debugging purposes:

Code: Select all

#!/bin/bash
{
echo "hello" >> /var/www/vhosts/animekyun.com/httpdocs/icarus/debug/debug_mu.txt

} &
When i run this script through the terminal, it works fine. But not with transmission.

Everything is being executed under the same user as transmission is running

Ideas?

I'm running transmission 2.33 BTW
Ortix
Posts: 28
Joined: Wed Nov 18, 2009 2:03 am

Re: Script not being executed (weird problem)

Post by Ortix »

bamp?
gunzip
Posts: 272
Joined: Wed May 05, 2010 2:12 am

Re: Script not being executed (weird problem)

Post by gunzip »

firstly, make sure there are no extra instances of the daemon running:

$ killall transmission-daemon

then check that "execute" mode is enabled on your script:

$ chmod +x ./upload.sh

Code: Select all

#!/bin/bash
{
echo "hello" >> /var/www/vhosts/animekyun.com/httpdocs/icarus/debug/debug_mu.txt
} &
even for that simple debug script above, the user running transmission would need permission to write to the directory /var/www/vhosts/animekyun.com/httpdocs/icarus/debug/ or the script will fail.

if still no luck, try changing the first line in your script to:

Code: Select all

#!/bin/sh
Ortix
Posts: 28
Joined: Wed Nov 18, 2009 2:03 am

Re: Script not being executed (weird problem)

Post by Ortix »

god bless you. Dunno which part made it work but i think it was the /bin/sh part :P I just did all of them :P
Post Reply