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