<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://test.amule.szerverem.hu/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://test.amule.szerverem.hu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GilesBathgate</id>
		<title>AMule Project FAQ - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://test.amule.szerverem.hu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GilesBathgate"/>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Special:Contributions/GilesBathgate"/>
		<updated>2026-04-05T18:24:47Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/Making_a_handy_amulecmd_script</id>
		<title>Making a handy amulecmd script</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Making_a_handy_amulecmd_script"/>
				<updated>2010-03-03T09:57:32Z</updated>
		
		<summary type="html">&lt;p&gt;GilesBathgate: /* Nice, but I only want to see finished downloads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;&lt;br /&gt;
'''English''' | &lt;br /&gt;
[[Making_a_handy_amulecmd_script-de|Deutsch]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is the goal? ==&lt;br /&gt;
&lt;br /&gt;
This script is meant to display information about what your [[aMuled]] has been up to in a way pleasing to the eyes, using [[AMuleCMD]]. Because it depends on the &amp;quot;show log&amp;quot; command, make sure you use aMule version 2.1.2 or higher.&lt;br /&gt;
&lt;br /&gt;
== The standard script ==&lt;br /&gt;
&lt;br /&gt;
The script itself is quite simple:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  # Version 20060330&lt;br /&gt;
 &lt;br /&gt;
  domule() {&lt;br /&gt;
    amulecmd -c &amp;quot;$@&amp;quot; | grep &amp;quot;^ &amp;gt;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  domule &amp;quot;show log&amp;quot; | sed &amp;quot;&lt;br /&gt;
  /: Failed to / {s/: \(.*\)/: `tput setaf 1`\1`tput sgr0`/;}&lt;br /&gt;
  /: Finished downloading/ {s/: \(.*\)/: `tput setaf 2`\1`tput sgr0`/;}&lt;br /&gt;
  /: Downloading / {s/: \(.*\)/: `tput setaf 3`\1`tput sgr0`/;}&lt;br /&gt;
  &amp;quot;&lt;br /&gt;
  echo &amp;quot;&amp;quot;&lt;br /&gt;
  domule &amp;quot;status&amp;quot; | sed &amp;quot;&lt;br /&gt;
  /Download:/ {s/\(Download:\)\(.*\)/\1`tput setaf 3`\2`tput sgr0`/;}&lt;br /&gt;
  /Upload:/ {s/\(Upload:\)\(.*\)/\1`tput setaf 2`\2`tput sgr0`/;}&lt;br /&gt;
  &amp;quot;&lt;br /&gt;
  domule &amp;quot;reset&amp;quot; &amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* This depends on the sh shell, the grep command and the sed command. If your system does not have sh, you will either have to install or change the first line to a shell you do have, f.e., /bin/bash&lt;br /&gt;
&lt;br /&gt;
When executing this script, you get something [http://qtea.nl/amule/amulelog.png like this]:&lt;br /&gt;
&lt;br /&gt;
== How to change the colours ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;tput set &amp;lt;digit&amp;gt;&amp;quot; is used to insert the colour codes. The different numbers stand for different colours. See man tput for other tricks you can do with tput.&lt;br /&gt;
&lt;br /&gt;
== How to remove the colours ==&lt;br /&gt;
&lt;br /&gt;
If you don't want the colours at all, you can remove the sed commands:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  # Version 20060330&lt;br /&gt;
 &lt;br /&gt;
  domule() {&lt;br /&gt;
    amulecmd -c &amp;quot;$@&amp;quot; | grep &amp;quot;^ &amp;gt;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  domule &amp;quot;show log&amp;quot;&lt;br /&gt;
  echo &amp;quot;&amp;quot;&lt;br /&gt;
  domule &amp;quot;status&amp;quot;&lt;br /&gt;
  domule &amp;quot;reset&amp;quot; &amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
== Nice, but I only want to see finished downloads ==&lt;br /&gt;
&lt;br /&gt;
This can be achieved by using the grep command:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  # Version 20060330&lt;br /&gt;
 &lt;br /&gt;
  domule() {&lt;br /&gt;
    amulecmd -c &amp;quot;$@&amp;quot; | grep &amp;quot;^ &amp;gt;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  domule &amp;quot;show log&amp;quot; | grep &amp;quot;: Finished downloading&amp;quot; || echo &amp;quot; &amp;gt; No finished downloads&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  echo &amp;quot;&amp;quot;&lt;br /&gt;
  domule &amp;quot;status&amp;quot;&lt;br /&gt;
  domule &amp;quot;reset&amp;quot; &amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
== How to use these scripts ==&lt;br /&gt;
&lt;br /&gt;
Simply save them to a plain text file and make them executable (f.e., on linux by applying 'chmod u+x &amp;lt;yourscriptfilehere&amp;gt;'). This will work on most OS'es, except maybe for Windows since the standard version does not come with a useful command line shell.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
There are a hunderd different things you can do with the output of &amp;quot;show log&amp;quot;, only limited by your imagination ;) If you want to change the behaviour of the script you might want to check out commands such as grep (easy), awk (a bit harder) and sed (can be quite tricky).&lt;/div&gt;</summary>
		<author><name>GilesBathgate</name></author>	</entry>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/Making_a_handy_amulecmd_script</id>
		<title>Making a handy amulecmd script</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Making_a_handy_amulecmd_script"/>
				<updated>2010-03-03T09:57:21Z</updated>
		
		<summary type="html">&lt;p&gt;GilesBathgate: /* How to remove the colours */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;&lt;br /&gt;
'''English''' | &lt;br /&gt;
[[Making_a_handy_amulecmd_script-de|Deutsch]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is the goal? ==&lt;br /&gt;
&lt;br /&gt;
This script is meant to display information about what your [[aMuled]] has been up to in a way pleasing to the eyes, using [[AMuleCMD]]. Because it depends on the &amp;quot;show log&amp;quot; command, make sure you use aMule version 2.1.2 or higher.&lt;br /&gt;
&lt;br /&gt;
== The standard script ==&lt;br /&gt;
&lt;br /&gt;
The script itself is quite simple:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  # Version 20060330&lt;br /&gt;
 &lt;br /&gt;
  domule() {&lt;br /&gt;
    amulecmd -c &amp;quot;$@&amp;quot; | grep &amp;quot;^ &amp;gt;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  domule &amp;quot;show log&amp;quot; | sed &amp;quot;&lt;br /&gt;
  /: Failed to / {s/: \(.*\)/: `tput setaf 1`\1`tput sgr0`/;}&lt;br /&gt;
  /: Finished downloading/ {s/: \(.*\)/: `tput setaf 2`\1`tput sgr0`/;}&lt;br /&gt;
  /: Downloading / {s/: \(.*\)/: `tput setaf 3`\1`tput sgr0`/;}&lt;br /&gt;
  &amp;quot;&lt;br /&gt;
  echo &amp;quot;&amp;quot;&lt;br /&gt;
  domule &amp;quot;status&amp;quot; | sed &amp;quot;&lt;br /&gt;
  /Download:/ {s/\(Download:\)\(.*\)/\1`tput setaf 3`\2`tput sgr0`/;}&lt;br /&gt;
  /Upload:/ {s/\(Upload:\)\(.*\)/\1`tput setaf 2`\2`tput sgr0`/;}&lt;br /&gt;
  &amp;quot;&lt;br /&gt;
  domule &amp;quot;reset&amp;quot; &amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* This depends on the sh shell, the grep command and the sed command. If your system does not have sh, you will either have to install or change the first line to a shell you do have, f.e., /bin/bash&lt;br /&gt;
&lt;br /&gt;
When executing this script, you get something [http://qtea.nl/amule/amulelog.png like this]:&lt;br /&gt;
&lt;br /&gt;
== How to change the colours ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;tput set &amp;lt;digit&amp;gt;&amp;quot; is used to insert the colour codes. The different numbers stand for different colours. See man tput for other tricks you can do with tput.&lt;br /&gt;
&lt;br /&gt;
== How to remove the colours ==&lt;br /&gt;
&lt;br /&gt;
If you don't want the colours at all, you can remove the sed commands:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  # Version 20060330&lt;br /&gt;
 &lt;br /&gt;
  domule() {&lt;br /&gt;
    amulecmd -c &amp;quot;$@&amp;quot; | grep &amp;quot;^ &amp;gt;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  domule &amp;quot;show log&amp;quot;&lt;br /&gt;
  echo &amp;quot;&amp;quot;&lt;br /&gt;
  domule &amp;quot;status&amp;quot;&lt;br /&gt;
  domule &amp;quot;reset&amp;quot; &amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
== Nice, but I only want to see finished downloads ==&lt;br /&gt;
&lt;br /&gt;
This can be achieved by using the grep command:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  # Version 20060330&lt;br /&gt;
&lt;br /&gt;
  domule() {&lt;br /&gt;
    amulecmd -c &amp;quot;$@&amp;quot; | grep &amp;quot;^ &amp;gt;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  domule &amp;quot;show log&amp;quot; | grep &amp;quot;: Finished downloading&amp;quot; || echo &amp;quot; &amp;gt; No finished downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  echo &amp;quot;&amp;quot;&lt;br /&gt;
  domule &amp;quot;status&amp;quot;&lt;br /&gt;
  domule &amp;quot;reset&amp;quot; &amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
== How to use these scripts ==&lt;br /&gt;
&lt;br /&gt;
Simply save them to a plain text file and make them executable (f.e., on linux by applying 'chmod u+x &amp;lt;yourscriptfilehere&amp;gt;'). This will work on most OS'es, except maybe for Windows since the standard version does not come with a useful command line shell.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
There are a hunderd different things you can do with the output of &amp;quot;show log&amp;quot;, only limited by your imagination ;) If you want to change the behaviour of the script you might want to check out commands such as grep (easy), awk (a bit harder) and sed (can be quite tricky).&lt;/div&gt;</summary>
		<author><name>GilesBathgate</name></author>	</entry>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/Making_a_handy_amulecmd_script</id>
		<title>Making a handy amulecmd script</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Making_a_handy_amulecmd_script"/>
				<updated>2010-03-03T09:57:08Z</updated>
		
		<summary type="html">&lt;p&gt;GilesBathgate: /* The standard script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;&lt;br /&gt;
'''English''' | &lt;br /&gt;
[[Making_a_handy_amulecmd_script-de|Deutsch]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is the goal? ==&lt;br /&gt;
&lt;br /&gt;
This script is meant to display information about what your [[aMuled]] has been up to in a way pleasing to the eyes, using [[AMuleCMD]]. Because it depends on the &amp;quot;show log&amp;quot; command, make sure you use aMule version 2.1.2 or higher.&lt;br /&gt;
&lt;br /&gt;
== The standard script ==&lt;br /&gt;
&lt;br /&gt;
The script itself is quite simple:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  # Version 20060330&lt;br /&gt;
 &lt;br /&gt;
  domule() {&lt;br /&gt;
    amulecmd -c &amp;quot;$@&amp;quot; | grep &amp;quot;^ &amp;gt;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  domule &amp;quot;show log&amp;quot; | sed &amp;quot;&lt;br /&gt;
  /: Failed to / {s/: \(.*\)/: `tput setaf 1`\1`tput sgr0`/;}&lt;br /&gt;
  /: Finished downloading/ {s/: \(.*\)/: `tput setaf 2`\1`tput sgr0`/;}&lt;br /&gt;
  /: Downloading / {s/: \(.*\)/: `tput setaf 3`\1`tput sgr0`/;}&lt;br /&gt;
  &amp;quot;&lt;br /&gt;
  echo &amp;quot;&amp;quot;&lt;br /&gt;
  domule &amp;quot;status&amp;quot; | sed &amp;quot;&lt;br /&gt;
  /Download:/ {s/\(Download:\)\(.*\)/\1`tput setaf 3`\2`tput sgr0`/;}&lt;br /&gt;
  /Upload:/ {s/\(Upload:\)\(.*\)/\1`tput setaf 2`\2`tput sgr0`/;}&lt;br /&gt;
  &amp;quot;&lt;br /&gt;
  domule &amp;quot;reset&amp;quot; &amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* This depends on the sh shell, the grep command and the sed command. If your system does not have sh, you will either have to install or change the first line to a shell you do have, f.e., /bin/bash&lt;br /&gt;
&lt;br /&gt;
When executing this script, you get something [http://qtea.nl/amule/amulelog.png like this]:&lt;br /&gt;
&lt;br /&gt;
== How to change the colours ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;tput set &amp;lt;digit&amp;gt;&amp;quot; is used to insert the colour codes. The different numbers stand for different colours. See man tput for other tricks you can do with tput.&lt;br /&gt;
&lt;br /&gt;
== How to remove the colours ==&lt;br /&gt;
&lt;br /&gt;
If you don't want the colours at all, you can remove the sed commands:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  # Version 20060330&lt;br /&gt;
&lt;br /&gt;
  domule() {&lt;br /&gt;
    amulecmd -c &amp;quot;$@&amp;quot; | grep &amp;quot;^ &amp;gt;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  domule &amp;quot;show log&amp;quot;&lt;br /&gt;
  echo &amp;quot;&amp;quot;&lt;br /&gt;
  domule &amp;quot;status&amp;quot;&lt;br /&gt;
  domule &amp;quot;reset&amp;quot; &amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
== Nice, but I only want to see finished downloads ==&lt;br /&gt;
&lt;br /&gt;
This can be achieved by using the grep command:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  # Version 20060330&lt;br /&gt;
&lt;br /&gt;
  domule() {&lt;br /&gt;
    amulecmd -c &amp;quot;$@&amp;quot; | grep &amp;quot;^ &amp;gt;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  domule &amp;quot;show log&amp;quot; | grep &amp;quot;: Finished downloading&amp;quot; || echo &amp;quot; &amp;gt; No finished downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  echo &amp;quot;&amp;quot;&lt;br /&gt;
  domule &amp;quot;status&amp;quot;&lt;br /&gt;
  domule &amp;quot;reset&amp;quot; &amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
== How to use these scripts ==&lt;br /&gt;
&lt;br /&gt;
Simply save them to a plain text file and make them executable (f.e., on linux by applying 'chmod u+x &amp;lt;yourscriptfilehere&amp;gt;'). This will work on most OS'es, except maybe for Windows since the standard version does not come with a useful command line shell.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
There are a hunderd different things you can do with the output of &amp;quot;show log&amp;quot;, only limited by your imagination ;) If you want to change the behaviour of the script you might want to check out commands such as grep (easy), awk (a bit harder) and sed (can be quite tricky).&lt;/div&gt;</summary>
		<author><name>GilesBathgate</name></author>	</entry>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/FAQ_amulecmd</id>
		<title>FAQ amulecmd</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/FAQ_amulecmd"/>
				<updated>2009-04-15T08:53:22Z</updated>
		
		<summary type="html">&lt;p&gt;GilesBathgate: /* Show downloads in a nicely formatted list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''English''' | &lt;br /&gt;
[[FAQ_amulecmd-de|Deutsch]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How can I configure amulecmd to schedule actions? (Linux) ==&lt;br /&gt;
&lt;br /&gt;
You have to configure such jobs with crontab. Let's do it by example:&amp;lt;br&amp;gt;&lt;br /&gt;
:bash ~# crontab -e&lt;br /&gt;
:00 6 &amp;amp;nbsp; * * * amulecmd -c &amp;quot;set bwlimit up 30&amp;quot;&lt;br /&gt;
:00 22 * * * amulecmd -c &amp;quot;set bwlimit up 0&amp;quot;&lt;br /&gt;
Will set your download bandwith limit to 30 kb/s on 6:00am and unlimited on 10:00pm. For more possibilities see also [[aMuleCMD]].&lt;br /&gt;
&lt;br /&gt;
== I cannot connect to [[aMuled]]. It seems [[aMuled]] does not create the listening port for connecting to it :-\? ==&lt;br /&gt;
&lt;br /&gt;
You have probably not enabled [[External Connections]] in ''~/.aMule/amule.conf&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You can create the value for ''ECPassword'' like that:&lt;br /&gt;
&lt;br /&gt;
  echo -n yourpasswordhere | md5sum | cut -d ' ' -f 1&lt;br /&gt;
&lt;br /&gt;
== How can I receive a mail every day with a summary of the files amuled downloaded? ==&lt;br /&gt;
&lt;br /&gt;
First, create [[Making a handy amulecmd script|this]] script and verify that it works properly. Then you can add it to your cron in the same way as shown above. Many cron-daemons will mail output of a script to your user. You can also use utilities like sendmail to mail the output of the script.&lt;br /&gt;
&lt;br /&gt;
== Usefull Scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Show downloads in a nicely formatted list ===&lt;br /&gt;
 &lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 amulecmd -c &amp;quot;show dl&amp;quot; | \&lt;br /&gt;
 grep '.' | \&lt;br /&gt;
 sed &amp;quot;1,/Succeeded/d&amp;quot; | \&lt;br /&gt;
 sed -n &amp;quot;N;s/^ &amp;gt; .*[0-9A-F]\{32\} \(.*\)\n &amp;gt;.*\[\(.*%\)\].*]\(.*\)/\2 \1\3/p&amp;quot; | \&lt;br /&gt;
 sort -n&lt;br /&gt;
&lt;br /&gt;
=== Call amulecmd from the commandline without mess ===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 amulecmd -c &amp;quot;$*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
save this script as &amp;quot;amc&amp;quot; and chmod +x it, then you can call amulecmd like this:&lt;br /&gt;
&lt;br /&gt;
 ./amc show log&lt;br /&gt;
&lt;br /&gt;
or pipe the output into another program&lt;br /&gt;
&lt;br /&gt;
 ./amc show log | grep completed&lt;br /&gt;
&lt;br /&gt;
I find this slightly easier than the original&lt;br /&gt;
&lt;br /&gt;
 amulecmd -c &amp;quot;show log&amp;quot; | grep completed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for results, until no more can be found===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 echo Searching for $1&lt;br /&gt;
 amulecmd -c &amp;quot;search kad $1&amp;quot; &amp;gt; /dev/null&lt;br /&gt;
 prevres=-1&lt;br /&gt;
 matchcount=0&lt;br /&gt;
 for c in `seq 1 10`;&lt;br /&gt;
 do&lt;br /&gt;
  sleep 5&lt;br /&gt;
  res=`amulecmd -c &amp;quot;results&amp;quot; | grep results: | sed &amp;quot;s/.*results: \(.*\)$/\1/&amp;quot;`&lt;br /&gt;
  if [ $res == $prevres ]&lt;br /&gt;
  then&lt;br /&gt;
   (( matchcount += 1 ))&lt;br /&gt;
   if [ $matchcount -gt 1 ]&lt;br /&gt;
   then&lt;br /&gt;
    matchcount=0&lt;br /&gt;
    break&lt;br /&gt;
   fi&lt;br /&gt;
  else&lt;br /&gt;
   matchcount=0&lt;br /&gt;
   prevres=$res&lt;br /&gt;
  fi&lt;br /&gt;
 done&lt;/div&gt;</summary>
		<author><name>GilesBathgate</name></author>	</entry>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/FAQ_amulecmd</id>
		<title>FAQ amulecmd</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/FAQ_amulecmd"/>
				<updated>2009-03-31T14:53:57Z</updated>
		
		<summary type="html">&lt;p&gt;GilesBathgate: /* Usefull Scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''English''' | &lt;br /&gt;
[[FAQ_amulecmd-de|Deutsch]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How can I configure amulecmd to schedule actions? (Linux) ==&lt;br /&gt;
&lt;br /&gt;
You have to configure such jobs with crontab. Let's do it by example:&amp;lt;br&amp;gt;&lt;br /&gt;
:bash ~# crontab -e&lt;br /&gt;
:00 6 &amp;amp;nbsp; * * * amulecmd -c &amp;quot;set bwlimit up 30&amp;quot;&lt;br /&gt;
:00 22 * * * amulecmd -c &amp;quot;set bwlimit up 0&amp;quot;&lt;br /&gt;
Will set your download bandwith limit to 30 kb/s on 6:00am and unlimited on 10:00pm. For more possibilities see also [[aMuleCMD]].&lt;br /&gt;
&lt;br /&gt;
== I cannot connect to [[aMuled]]. It seems [[aMuled]] does not create the listening port for connecting to it :-\? ==&lt;br /&gt;
&lt;br /&gt;
You have probably not enabled [[External Connections]] in ''~/.aMule/amule.conf&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You can create the value for ''ECPassword'' like that:&lt;br /&gt;
&lt;br /&gt;
  echo -n yourpasswordhere | md5sum | cut -d ' ' -f 1&lt;br /&gt;
&lt;br /&gt;
== How can I receive a mail every day with a summary of the files amuled downloaded? ==&lt;br /&gt;
&lt;br /&gt;
First, create [[Making a handy amulecmd script|this]] script and verify that it works properly. Then you can add it to your cron in the same way as shown above. Many cron-daemons will mail output of a script to your user. You can also use utilities like sendmail to mail the output of the script.&lt;br /&gt;
&lt;br /&gt;
== Usefull Scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Show downloads in a nicely formatted list ===&lt;br /&gt;
 &lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 amulecmd -c &amp;quot;show dl&amp;quot; | \&lt;br /&gt;
 grep '.' | \&lt;br /&gt;
 sed &amp;quot;1,/command list/d&amp;quot; | \&lt;br /&gt;
 sed -n &amp;quot;N;s/^ &amp;gt; .*[0-9A-F]\{32\} \(.*\)\n &amp;gt;.*\[\(.*%\)\].*]\(.*\)/\2 \1\3/p&amp;quot; | \&lt;br /&gt;
 sort -n&lt;br /&gt;
&lt;br /&gt;
=== Call amulecmd from the commandline without mess ===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 amulecmd -c &amp;quot;$*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
save this script as &amp;quot;amc&amp;quot; and chmod +x it, then you can call amulecmd like this:&lt;br /&gt;
&lt;br /&gt;
 ./amc show log&lt;br /&gt;
&lt;br /&gt;
or pipe the output into another program&lt;br /&gt;
&lt;br /&gt;
 ./amc show log | grep completed&lt;br /&gt;
&lt;br /&gt;
I find this slightly easier than the original&lt;br /&gt;
&lt;br /&gt;
 amulecmd -c &amp;quot;show log&amp;quot; | grep completed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for results, until no more can be found===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 echo Searching for $1&lt;br /&gt;
 amulecmd -c &amp;quot;search kad $1&amp;quot; &amp;gt; /dev/null&lt;br /&gt;
 prevres=-1&lt;br /&gt;
 matchcount=0&lt;br /&gt;
 for c in `seq 1 10`;&lt;br /&gt;
 do&lt;br /&gt;
  sleep 5&lt;br /&gt;
  res=`amulecmd -c &amp;quot;results&amp;quot; | grep results: | sed &amp;quot;s/.*results: \(.*\)$/\1/&amp;quot;`&lt;br /&gt;
  if [ $res == $prevres ]&lt;br /&gt;
  then&lt;br /&gt;
   (( matchcount += 1 ))&lt;br /&gt;
   if [ $matchcount -gt 1 ]&lt;br /&gt;
   then&lt;br /&gt;
    matchcount=0&lt;br /&gt;
    break&lt;br /&gt;
   fi&lt;br /&gt;
  else&lt;br /&gt;
   matchcount=0&lt;br /&gt;
   prevres=$res&lt;br /&gt;
  fi&lt;br /&gt;
 done&lt;/div&gt;</summary>
		<author><name>GilesBathgate</name></author>	</entry>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/FAQ_amulecmd</id>
		<title>FAQ amulecmd</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/FAQ_amulecmd"/>
				<updated>2009-01-03T13:20:35Z</updated>
		
		<summary type="html">&lt;p&gt;GilesBathgate: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;'''English''' | &lt;br /&gt;
[[FAQ_amulecmd-de|Deutsch]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How can I configure amulecmd to schedule actions? (Linux) ==&lt;br /&gt;
&lt;br /&gt;
You have to configure such jobs with crontab. Let's do it by example:&amp;lt;br&amp;gt;&lt;br /&gt;
:bash ~# crontab -e&lt;br /&gt;
:00 6 &amp;amp;nbsp; * * * amulecmd -c &amp;quot;set bwlimit up 30&amp;quot;&lt;br /&gt;
:00 22 * * * amulecmd -c &amp;quot;set bwlimit up 0&amp;quot;&lt;br /&gt;
Will set your download bandwith limit to 30 kb/s on 6:00am and unlimited on 10:00pm. For more possibilities see also [[aMuleCMD]].&lt;br /&gt;
&lt;br /&gt;
== I cannot connect to [[aMuled]]. It seems [[aMuled]] does not create the listening port for connecting to it :-\? ==&lt;br /&gt;
&lt;br /&gt;
You have probably not enabled [[External Connections]] in ''~/.aMule/amule.conf&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You can create the value for ''ECPassword'' like that:&lt;br /&gt;
&lt;br /&gt;
  echo -n yourpasswordhere | md5sum | cut -d ' ' -f 1&lt;br /&gt;
&lt;br /&gt;
== How can I receive a mail every day with a summary of the files amuled downloaded? ==&lt;br /&gt;
&lt;br /&gt;
First, create [[Making a handy amulecmd script|this]] script and verify that it works properly. Then you can add it to your cron in the same way as shown above. Many cron-daemons will mail output of a script to your user. You can also use utilities like sendmail to mail the output of the script.&lt;br /&gt;
&lt;br /&gt;
== Usefull Scripts ==&lt;br /&gt;
&lt;br /&gt;
=== Show downloads in a nicely formatted list ===&lt;br /&gt;
 &lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 amulecmd -c &amp;quot;show dl&amp;quot; | \&lt;br /&gt;
 grep '.' | \&lt;br /&gt;
 sed &amp;quot;1,/command list/d&amp;quot; | \&lt;br /&gt;
 sed -n &amp;quot;N;s/^ &amp;gt; .*[0-9A-F]\{32\} \(.*\)\n &amp;gt;.*\[\(.*%\)\].*]\(.*\)/\2 \1\3/p&amp;quot; | \&lt;br /&gt;
 sort -n&lt;br /&gt;
&lt;br /&gt;
=== Call amulecmd from the commandline without mess ===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 amulecmd -c &amp;quot;$*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
save this script as &amp;quot;amc&amp;quot; and chmod +x it, then you can call amulecmd like this:&lt;br /&gt;
&lt;br /&gt;
 ./amc show log&lt;br /&gt;
&lt;br /&gt;
or pipe the output into another program&lt;br /&gt;
&lt;br /&gt;
 ./amc show log | grep completed&lt;br /&gt;
&lt;br /&gt;
I find this slightly easier than the original&lt;br /&gt;
&lt;br /&gt;
 amulecmd -c &amp;quot;show log&amp;quot; | grep completed.&lt;/div&gt;</summary>
		<author><name>GilesBathgate</name></author>	</entry>

	</feed>