aMule Forum

English => aMule Help => Topic started by: michelinok on February 06, 2011, 06:20:54 PM

Title: Core command...
Post by: michelinok on February 06, 2011, 06:20:54 PM
Hi!
I've set this command

echo %NAME >> /hddext/filesharingscaricati.txt

on downoad completed, but it never write anything to the file.
What am i wrong? (/hddext exists of course!).
Title: Re: Core command...
Post by: Stu Redman on February 06, 2011, 08:25:05 PM
You have to name an executable, not a shell command. For that you have to name the shell to be executed.
Just putting your line in an executable shell script and using that should work.
Title: Re: Core command...
Post by: btkaos on February 07, 2011, 12:30:35 AM
Also see

Code: [Select]
sh -c "echo %NAME >> ...."
Title: Re: Core command...
Post by: michelinok on February 08, 2011, 08:05:08 AM
Should this work?


#!/bin/bash
echo "$1" >> /hddext/filesharingscaricati.txt


it doesn't work at all...(i call it with the name of the script followed by %NAME)
Title: Re: Core command...
Post by: Kry on February 08, 2011, 09:42:46 AM
Did you chmod 700 the script and chown it to the user that runs aMule?
Title: Re: Core command...
Post by: michelinok on February 08, 2011, 12:48:28 PM
Did you chmod 700 the script and chown it to the user that runs aMule?

yes, chmod'ed and tryed it from the command line...and from the command line it works.
Any idea?
Title: Re: Core command...
Post by: michelinok on February 09, 2011, 09:31:55 PM
anyone can help me?  ::)
Title: Re: Core command...
Post by: ^marcell^ on February 09, 2011, 10:43:34 PM
Should this work?


#!/bin/bash
echo "$1" >> /hddext/filesharingscaricati.txt


it doesn't work at all...(i call it with the name of the script followed by %NAME)

You have to add the full path to the script, not only the name of the script.
Title: Re: Core command...
Post by: michelinok on February 11, 2011, 07:00:57 PM
Should this work?


#!/bin/bash
echo "$1" >> /hddext/filesharingscaricati.txt


it doesn't work at all...(i call it with the name of the script followed by %NAME)

You have to add the full path to the script, not only the name of the script.

yes, this is what i've done:

sh /bin/scrivi.sh %NAME

anyway  "scrivi.sh" is in the path and works anywhere in my filesystem.
I've no idea now  :-[ :-[ :'(
Title: Re: Core command...
Post by: ^marcell^ on February 12, 2011, 07:54:46 PM
Do you run aMule with the same user that you execute the script in the terminal?

I tested the core command for completed downloads with a script located in my home directory. It worked.
I would suggest to copy the script to a different location. Scripts shouldn't be stored in the "/bin" directory.
Perhaps try to store it in the home folder and run aMule with the user who's home folder it is located in.