2007-05-15 02:09:31 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# /etc/rc.d/mlnetd: start/stop mldonkey daemon
|
|
|
|
#
|
|
|
|
|
2008-01-28 11:24:44 +01:00
|
|
|
LOG_FILE=/var/log/mlnetd
|
|
|
|
|
2007-05-15 02:09:31 +02:00
|
|
|
case $1 in
|
2007-12-19 01:03:50 +01:00
|
|
|
start)
|
|
|
|
export MLDONKEY_DIR=/var/mlnet
|
2008-01-28 11:24:44 +01:00
|
|
|
su mldonkey -c \
|
|
|
|
"mlnet -run_as_user mldonkey 2>&1 >/dev/null" 2>&1 >$LOG_FILE &
|
2007-12-19 01:03:50 +01:00
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
pkill mlnet
|
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
$0 stop
|
|
|
|
sleep 1
|
|
|
|
$0 start
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 [start|stop|restart]"
|
|
|
|
;;
|
2007-05-15 02:09:31 +02:00
|
|
|
esac
|
|
|
|
|
|
|
|
# End of file
|