› Foros › PC › Software libre
PATH=/bin:/usr/bin:/usr/local/bin/:/sbin/:/usr/sbin/
PIDFILE=/var/run/amuled.pid
DAEMON=/usr/local/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
jesus@WhiteWidow:/home/amule$ ls -l
total 4416
-rw-r--r-- 1 amule amule 2429 2005-06-05 13:10 amule.conf
-rw-r----- 1 amule amule 988181 2005-06-05 13:10 clients.met
-rw-r----- 1 amule amule 974139 2005-06-05 03:17 clients.met.BAK
-rw-r--r-- 1 amule amule 361 2005-05-06 00:33 cryptkey.dat
-rw-r----- 1 amule amule 5 2005-06-05 13:11 emfriends.met
drwxrwxrwx 2 amule amule 48 2005-06-04 20:15 Incoming
-rw-r--r-- 1 amule amule 0 2005-06-05 13:10 ipfilter.dat
-rw-r----- 1 amule amule 2337544 2005-06-04 17:02 known2.met
-rw-r----- 1 amule amule 47552 2005-06-05 13:10 known.met
-rw-r--r-- 1 amule amule 22 2005-06-05 03:17 lastversion
-rw-r--r-- 1 amule amule 7675 2005-06-05 13:10 logfile
-rw-r----- 1 amule amule 17 2005-06-05 13:10 preferences.dat
-rw-r----- 1 amule amule 66891 2005-06-05 13:11 server.met
-rw-r----- 1 amule amule 64628 2005-06-05 03:18 server_met.old
-rw-r--r-- 1 amule amule 0 2005-06-05 13:10 shareddir.dat
drwxr-x--- 2 amule amule 664 2005-06-05 13:11 Temp
chmod +x amule-server
WhiteWidow:~# /etc/init.d/amule-server start
Starting aMule : amuled.