Démarrage d’aMuled au boot
Juin 15
2009
2009
Comments Off
pré requis :
- Fedora, RHEL, Centos, SME7, …
- aMuled
Startup script for RedHat (Fedora, RHEL, Centos, SME7, …)
Run su, or prefix commands with sudo, to become root.
Edit the USER= line to set it to your current user (as reported by whoami).
Copy the script as /etc/init.d/amuled:
- cp amuled /etc/init.d/amuled
Make it executable:
- chmod 755 /etc/init.d/amuled
Then register the service :
- chkconfig –add amuled
The alternate script contains the following lines :
#!/bin/sh
# aMule - script shell pour l'arret/demarrage du service
# description: amule p2p download service
# chkconfig: 345 97 03
# Source function library.
. /etc/rc.d/init.d/functions
USER=p2p #A user who already ran amule once to configure it.
RETVAL=0
case "$1" in
start)
echo -n "Starting amule daemon: "
daemon --user=$USER amuled -f
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/amule
;;
stop)
echo -n "Stopping amule daemon: "
killproc amuled
RETVAL=$?
rm -f /var/lock/subsys/amule && rm -f /var/lock/amule
echo
;;
status)
status amuled
RETVAL=$?
;;
restart|force-reload)
$0 stop
$0 start
RETVAL=$?
;;
*)
printf "Usage: %q {start|stop|status|restart|force-reload}\n" "$0" >&2
exit 1
;;
esac
exit $RETVAL
Source : http://www.amule.org/wiki/index.php/FAQ_amuled