aMule Forum

English => en_Bugs => Topic started by: chrille on February 17, 2005, 04:08:26 PM

Title: Problem with amulecmd
Post by: chrille on February 17, 2005, 04:08:26 PM
Hello Folks,
I'm using amuled with amuleweb and amulecmd.
I wanted to reload my ipfilter.dat via cron within a shellscript using amulecmd.

If I use
Code: [Select]
./amulecmd -pw mypass -c reloadipf -qI get no reaction from the script. Same's on the shell.

If I do it without -q (quiet):
Code: [Select]
./amulecmd -pw mypass -c reloadipfeverything works fine, but I get output to stdout.

I've discussed that with Xaignar on IRC. After he checked the source, he found:
Code: [Select]
if (m_KeepQuiet) {
   while(true) {
      pause();
   }
} else {
   TextShell(ProgName, commands);
}
and guessed, this would be a bug.

Cheers,
SlurmAddicted Chrille.  ;)
Title: Re: Problem with amulecmd
Post by: phoenix on February 17, 2005, 04:59:31 PM
Hey chrille!

This is not a bug :) It was just not meant to be used like that :D

You see, -q parameter was intended to be used with amuleweb, so that it could be daemonized. To use amulecmd, so that it does not produce output, just redirect its output. You must do something like this:

$ amulecmd -f -c reloadipf > /dev/null

Notice the use of -f instead of -pw, so that you do not need to type the password if the connection is local.

Cheers!
Title: Re: Problem with amulecmd
Post by: chrille on February 18, 2005, 05:10:01 PM
Okay! Thank you.
I was just wondering, why the -q switch didn't work.

Cheers,
Chrille.