aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Problem with amulecmd  (Read 1803 times)

chrille

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Problem with amulecmd
« 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.  ;)
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Problem with amulecmd
« Reply #1 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!
Logged

chrille

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: Problem with amulecmd
« Reply #2 on: February 18, 2005, 05:10:01 PM »

Okay! Thank you.
I was just wondering, why the -q switch didn't work.

Cheers,
Chrille.
Logged