summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb Tennis <caleb@gentoo.org>2003-09-11 02:53:11 +0000
committerCaleb Tennis <caleb@gentoo.org>2003-09-11 02:53:11 +0000
commit0541a3f40e2ab1b7d61fa4d379d1c691ae5a396e (patch)
tree7a15b8bc9a59566d32fe3adc77d5532567205d25 /net-p2p
parentadd new kdes (diff)
downloadhistorical-0541a3f40e2ab1b7d61fa4d379d1c691ae5a396e.tar.gz
historical-0541a3f40e2ab1b7d61fa4d379d1c691ae5a396e.tar.bz2
historical-0541a3f40e2ab1b7d61fa4d379d1c691ae5a396e.zip
fix these files (bug #27005)
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/mldonkey/ChangeLog5
-rw-r--r--net-p2p/mldonkey/Manifest14
-rw-r--r--net-p2p/mldonkey/files/mldonkey.confd35
-rw-r--r--net-p2p/mldonkey/files/mldonkey.initd58
4 files changed, 74 insertions, 38 deletions
diff --git a/net-p2p/mldonkey/ChangeLog b/net-p2p/mldonkey/ChangeLog
index 141671fbd0ba..e603550d2344 100644
--- a/net-p2p/mldonkey/ChangeLog
+++ b/net-p2p/mldonkey/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for net-p2p/mldonkey
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/mldonkey/ChangeLog,v 1.17 2003/08/17 14:19:44 mholzer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/mldonkey/ChangeLog,v 1.18 2003/09/11 02:53:02 caleb Exp $
+
+ 10 Sep 2003; Caleb Tennis <caleb@gentoo.org> mldonkey-2.5.3-r1.ebuild:
+ Rethink the config files - bug #27005
17 Aug 2003; Martin Holzer <mholzer@gentoo.org> mldonkey-2.5.3-r1.ebuild:
Marked x86 stable.
diff --git a/net-p2p/mldonkey/Manifest b/net-p2p/mldonkey/Manifest
index 053cf62c3cf1..95a24cdfe21b 100644
--- a/net-p2p/mldonkey/Manifest
+++ b/net-p2p/mldonkey/Manifest
@@ -1,12 +1,12 @@
-MD5 39bc7e1f2b3b8143ee3034258f00c1b7 ChangeLog 3013
-MD5 cb323c6d5864e01b2e42613214648605 mldonkey-2.02-r1.ebuild 2213
MD5 a075ca3d192d8bda50ab01cd32c45bc5 mldonkey-2.5-r1.ebuild 1865
-MD5 2aece486034a2d8ff26aa5ec7489bfc2 metadata.xml 398
+MD5 cb323c6d5864e01b2e42613214648605 mldonkey-2.02-r1.ebuild 2213
MD5 9090d40b22fff604790ee1f0f945ed8f mldonkey-2.5.3-r1.ebuild 2513
-MD5 3127e746056c13574b2509e71bc074b5 files/97mldonkey 42
+MD5 2e3f322d55592f4a39a531a0f804e055 ChangeLog 3125
+MD5 2aece486034a2d8ff26aa5ec7489bfc2 metadata.xml 398
+MD5 cc820f9d66d277f2cd46ef750e918807 files/digest-mldonkey-2.5.3-r1 75
+MD5 476ec69e79e7c93a7bdaa6cb049c0857 files/mldonkey.confd 836
+MD5 24bcd7ce98abd09b9b6e9d96c0c1d903 files/mldonkey.initd 1754
MD5 d7470a0d99aae3be1ce3859c14e51b2b files/digest-mldonkey-2.5-r1 75
+MD5 3127e746056c13574b2509e71bc074b5 files/97mldonkey 42
MD5 d9f838448fda4db6ac2d244804c8d664 files/mldonkey 307
MD5 a3754baf66ab9ac99f566b5f762b0c91 files/digest-mldonkey-2.02-r1 142
-MD5 cc820f9d66d277f2cd46ef750e918807 files/digest-mldonkey-2.5.3-r1 75
-MD5 68cd25ffff70938bbb5ba3740f3aaf06 files/mldonkey.confd 536
-MD5 76eb50955daee7341495adec95a9d807 files/mldonkey.initd 1466
diff --git a/net-p2p/mldonkey/files/mldonkey.confd b/net-p2p/mldonkey/files/mldonkey.confd
index b2205ebcd27f..51f53d34db3d 100644
--- a/net-p2p/mldonkey/files/mldonkey.confd
+++ b/net-p2p/mldonkey/files/mldonkey.confd
@@ -1,25 +1,38 @@
-# Config file for /etc/init.d/mldonkey
+# /etc/conf.d/mldonkey
+# Config file for mldonkey control script
+
+# Change the following vars only if you know
+# what you're doing, there's no checking for
+# invalid data yet!
# owner of mlnet process (don't change, must be existing)
-MLUSER="p2p"
+USER="p2p"
# home dir of owner (don't change, must be existing)
-MLHOME="/home/p2p"
+BASEDIR="/home/p2p"
# subdir if any (will be created, if not existing)
-MLDIR=".mldonkey"
+SUBDIR=".mldonkey"
# logfile (/dev/null for nowhere)
-MLLOG="/var/log/mldonkey.log"
+LOG="/var/log/mldonkey.log"
# bandwidth control, values in kb/s
-MLLOWDOWN="6"
-MLLOWUP="2"
-MLHIGHDOWN="30"
-MLHIGHUP="10"
+LOW_DOWN="6"
+LOW_UP="2"
+HIGH_DOWN="30"
+HIGH_UP="10"
# nice level, 0<x<19, more nice -> less cpuspeed consumed
-MLNICE="19"
+NICE="19"
+
+# mldonkey server ip, usually localhost
+SERVER="localhost"
# port for webinterface, usually 4080
-MLPORT="4080"
+PORT="4080"
+
+# to enable password restricted access,
+# uncomment and set BOTH following vars:
+#USERNAME="admin"
+#PASSWORD=""
diff --git a/net-p2p/mldonkey/files/mldonkey.initd b/net-p2p/mldonkey/files/mldonkey.initd
index 5d4000322d20..280e23a04583 100644
--- a/net-p2p/mldonkey/files/mldonkey.initd
+++ b/net-p2p/mldonkey/files/mldonkey.initd
@@ -8,32 +8,38 @@ depend() {
start() {
ebegin "Starting mldonkey"
- if [ ! -d ${MLHOME}/${MLDIR} ]
+ if [ ! -d ${BASEDIR}/${SUBDIR} ]
then
- einfo "Directory ${MLHOME}/${MLDIR} not existing, trying to create..."
- su ${MLUSER} -c "mkdir ${MLHOME}/${MLDIR}"
- if [ ! -d ${MLHOME}/${MLDIR} ]
+ einfo "Directory ${BASEDIR}/${SUBDIR} not existing, trying to create..."
+ su ${MLUSER} -c "mkdir ${BASEDIR}/${SUBDIR}"
+ if [ ! -d ${BASEDIR}/${DIR} ]
then
- eerror "Directory ${MLHOME}/${MLDIR} could not be created!"
+ eerror "Directory ${BASEDIR}/${SUBDIR} could not be created!"
return 1
fi
einfo "...ok!"
fi
- cd ${MLHOME}/${MLDIR}/
- start-stop-daemon --quiet --start -c ${MLUSER} \
- -x /usr/bin/mlnet &>${MLLOG} &
+ cd ${BASEDIR}/${SUBDIR}/
+ start-stop-daemon --quiet --start -c ${USER} \
+ -x /usr/bin/mlnet &>${LOG} &
sleep 5
- renice ${MLNICE} -u ${MLUSER} >/dev/null
+ renice ${NICE} -u ${USER} >/dev/null
eend $?
}
stop() {
+ BASE="http://"
+ if [[ -n ${USERNAME} && -n ${PASSWORD} ]]
+ then
+ BASE=${BASE}${USERNAME}:${PASSWORD}@
+ fi
+ BASE=${BASE}${SERVER}:${PORT}
ebegin "Stopping mldonkey - please wait"
- wget --spider http://$DONKSRV:4080/submit?q=close_fds -q
- wget --spider http://$DONKSRV:4080/submit?q=save -q
- wget --spider http://$DONKSRV:4080/submit?q=kill -q
+ wget --spider ${BASE}/submit?q=close_fds -q
+ wget --spider ${BASE}/submit?q=save -q
+ wget --spider ${BASE}/submit?q=kill -q
sleep 10
- start-stop-daemon --oknodo --stop -x /usr/bin/mlnet
+ start-stop-daemon --oknodo --stop -x /usr/bin/mlnet
eend $?
}
@@ -44,21 +50,35 @@ restart() {
}
slow() {
- ebegin "Reducing bandwidth to ${MLLOWDOWN}k/${MLLOWUP}k"
+ ebegin "Reducing bandwidth to ${LOW_DOWN}k/${LOW_UP}k"
+
+ BASE="http://"
+ if [[ -n ${USERNAME} && -n ${PASSWORD} ]]
+ then
+ BASE=${BASE}${USERNAME}:${PASSWORD}@
+ fi
+ BASE=${BASE}${SERVER}:${PORT}
- wget --spider http://localhost:${MLPORT}/submit?q=set+max_hard_download_rate+${MLLOWDOWN} -q
+ wget --spider ${BASE}/submit?q=set+max_hard_download_rate+${LOW_DOWN} -q
- wget --spider http://localhost:${MLPORT}/submit?q=set+max_hard_upload_rate+${MLLOWUP} -q
+ wget --spider ${BASE}/submit?q=set+max_hard_upload_rate+${LOW_UP} -q
eend $?
}
fast() {
- ebegin "Increasing bandwidth to ${MLHIGHDOWN}k/${MLHIGHUP}k"
+ ebegin "Increasing bandwidth to ${HIGH_DOWN}k/${HIGH_UP}k"
+
+ BASE="http://"
+ if [[ -n ${USERNAME} && -n ${PASSWORD} ]]
+ then
+ BASE=${BASE}${USERNAME}:${PASSWORD}@
+ fi
+ BASE=${BASE}${SERVER}:${PORT}
- wget --spider http://localhost:${MLPORT}/submit?q=set+max_hard_download_rate+${MLHIGHDOWN} -q
+ wget --spider ${BASE}/submit?q=set+max_hard_download_rate+${HIGH_DOWN} -q
- wget --spider http://localhost:${MLPORT}/submit?q=set+max_hard_upload_rate+${MLHIGHUP} -q
+ wget --spider ${BASE}/submit?q=set+max_hard_upload_rate+${HIGH_UP} -q
eend $?
}