aMuleis a very comfortable p2p client. For Linux it has even the daemon
aMuled and the text style interface
aMuleCMD, which means a great solution for the remote control. | First install amule (with yast apt or whatever you use) or download aMule here http://www.amule.org/ and compile it. Don't forget to create or edit /home/username/.aMule/amule.conf.
Now we will prepare the enviropment for the amuled run. As root create a group and a user for run amuled like this:
BASH:
user@host:~> groupadd amule
user@host:~> useradd -s /bin/noshell -g amule amule
user@host:~> usermod -G amule existinguser
This will create group amule and user amule. This user needs no shell and no home directory. Additionally the existinguser is added to the amule group. Edit the amule.comf to use the home folder of the existinguser for saving incomming files.
Then create the file /etc/init.d/amuled. Note, that you could use the /etc/sysconfig folder to define AMULED_BIN, USER, GROUP variables as well as some other variables for detaled tuning.
BASH:
#!/bin/sh
. /etc/rc.status
rc_reset
# you could use the /etc/sysconfig/amule to define the variables and
# . /etc/sysconfig/amule to read them in
AMULED_BIN=/usr/bin/amuled
USER=amule
GROUP=amule
case "$1" in
start)
echo -n "Starting amule daemon"
/sbin/startproc -f -u $USER -g $GROUP $AMULED_BIN -f
rc_status -v
;;
stop)
echo -n "Stopping amule daemon"
/sbin/killproc -TERM $AMULED_BIN
rc_status -v
;;
status)
echo -n "Checking for amuled:"
/sbin/checkproc $AMULED_BIN
rc_status -v
;;
restart|force-reload)
$0 stop
$0 start
rc_status
;;
*)
printf "Usage: %q {start|stop|status|restart|force-reload}\n" "$0" >&2
exit 1
;;
esac
rc_exit
After making this file executable add it to autostart:
BASH:
user@host:~> chmod +x /etc/init.d/amuled
user@host:~> chkconfig --add amuled
Now we can finally start
aMuled and controll it with
aMuleCMD. Edit the amule.conf for aMuleCMD password.
This script was tested on SuSE 10.2 x86-64 only, so if you have some issues on other versions please let me know.