Here's what I did using amuled for a Ubuntu.
1 - created an 'amule' user, and configured amule (as that user) to accept external connections (using tcp, that was the only way I was successfull), put the password, configure anything else as amuled will use that configuration.
2- put the following script executable (with "chmod 777 amuled") as /etc/init.d/amuled
This script runs amuled under user 'amule'!
#!/bin/sh
#
PATH=/bin:/usr/bin:/usr/local/bin/:/sbin/:/usr/sbin/
DAEMON=/usr/bin/amuled
USER=amule
case "$1" in
start)
echo -n "Starting aMule : amuled"
export HOME=/home/amule/
start-stop-daemon --chuid $USER --user $USER --start --exec $DAEMON --background
export HOME=/root/
echo "."
;;
stop)
echo -n "Stopping aMule : amuled"
start-stop-daemon --stop --chuid $USER --user $USER --exec $DAEMON
echo "."
;;
reload)
echo "Not implemented."
;;
force-reload|restart)
sh $0 stop
sh $0 start
;;
*)
echo "Usage: /etc/init.d/amuled-server {start|stop|restart|force-reload|reload}"
exit 1
;;
esac
exit 0
3 - linked it to /etc/rc2.d/S80amuled (with "ln -s /etc/init.d/amuled /etc/rc2.d/S80amuled" )
4 - amuled starts automatically now. If I ever need to restart I do "sudo /etc/init.d/amuled restart", sudo "/etc/init.d/amuled" will return all possible actions.
It's amazing!!! I love amuled!!