28 lines
401 B
Bash
28 lines
401 B
Bash
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/mlnetd: start/stop mldonkey daemon
|
|
#
|
|
|
|
LOG_FILE=/var/log/mlnetd
|
|
|
|
case $1 in
|
|
start)
|
|
export MLDONKEY_DIR=/var/mlnet
|
|
su mldonkey -c \
|
|
"mlnet -run_as_user mldonkey 2>&1 >/dev/null" 2>&1 >$LOG_FILE &
|
|
;;
|
|
stop)
|
|
pkill mlnet
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 [start|stop|restart]"
|
|
;;
|
|
esac
|
|
|
|
# End of file
|