Difference between revisions of "AMule"

From ArchWiki
Jump to: navigation, search
(amuled service)
(No difference)

Revision as of 19:59, 25 January 2010

aMule is an eMule-like client for the eD2k and Kademlia networks, supporting multiple platforms.


aMuled is a full featured aMule, running without any user interface (GUI). It is controlled by remote access through aMuleWeb, or aMuleGUI.

We will create a service for amuled and amuleweb.

Create a user that will run the services

We create a user and run amuled and amuleweb once to create the configuration files :

#sudo useradd -m -s /bin/bash p2p
#sudo su p2p
#amuled --ec-config

Choose a password (amule for example) and then stop amuled using Ctrl-C. Start amuleweb too to create the configuration file :

#amuleweb --write-config --password=amule --admin-pass=amule

We can now set p2p's shell to /bin/false as we don't want to give it shell access to the machine.

Edit /etc/password and replace /bin/bash by /bin/false


amuled service

Create /etc/rc.d/amuled :


NAME=$(basename "$0")
USER=p2p #A user who already ran amule once to configure it.     

test -x "$DAEMON" || exit 0

case "$1" in
   echo -n "Starting $DESC: "
       su "$USER" -c "$(printf "%q -f" "$DAEMON" )"
       su "$USER" -c "$(printf "%q --quiet &" "$WEB" )"
   echo "$NAME."
   echo -n "Stopping $DESC: "
     killall --quiet --ignore-case "$WEB"
     killall --quiet --ignore-case "$DAEMON"
   echo "$NAME."
   echo -n "Restarting $DESC: "
       killall --quiet --ignore-case "$WEB"
       killall --quiet --ignore-case "$DAEMON"
   sleep 1
       su $USER -c "$DAEMON -f"
       su $USER -c "$WEB --quiet &"
   echo "$NAME."
   printf "Usage: %q {start|stop|restart|force-reload}\n" "$0" >&2
   exit 1

exit 0

Make it runnable :

#sudo chmod 755 /etc/rc.d/amuled

You can now use amuleGui to connect to amuled remotely. You can also use connect to amuleweb using http://yourserver:4711/