summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-01-26 23:18:33 +0000
committerMike Frysinger <vapier@gentoo.org>2003-01-26 23:18:33 +0000
commit9a94778c471d1712fdbbf26f42c1cd7e565e9163 (patch)
tree917b2bfb33502170a298806d03a782595e1c2ae4 /net-p2p/dchub/files
parentadded missing glib depend (diff)
downloadgentoo-2-9a94778c471d1712fdbbf26f42c1cd7e565e9163.tar.gz
gentoo-2-9a94778c471d1712fdbbf26f42c1cd7e565e9163.tar.bz2
gentoo-2-9a94778c471d1712fdbbf26f42c1cd7e565e9163.zip
version bump #14577
Diffstat (limited to 'net-p2p/dchub/files')
-rw-r--r--net-p2p/dchub/files/dchub.conf.d25
-rw-r--r--net-p2p/dchub/files/dchub.init.d40
-rw-r--r--net-p2p/dchub/files/digest-dchub-0.2.51
3 files changed, 66 insertions, 0 deletions
diff --git a/net-p2p/dchub/files/dchub.conf.d b/net-p2p/dchub/files/dchub.conf.d
new file mode 100644
index 000000000000..0ff2fde5333d
--- /dev/null
+++ b/net-p2p/dchub/files/dchub.conf.d
@@ -0,0 +1,25 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/dchub/files/dchub.conf.d,v 1.1 2003/01/26 23:18:33 vapier Exp $
+
+# dchub configuration directory
+DCHUB_CONF_DIR="/etc/dchub"
+
+# extra options to pass to dchub
+# -U, --UID=USERNAME ask DcHub to change UID after having bind the main port.
+# -d, --pscriptdir=DIRECTORY name of the directory containing perl script.
+# -s, --pscriptinit=FILENAME name of the filename loaded when perl starts.
+# -n, --newport=NUMBER change listening port of the hub. After using
+# this option, the new port is stored in the
+# database and the option is no more required.
+# -f, --forceport=NUMBER force DCHUB to register a specific Port
+# -e, --exprogdir=DIRECTORY name of the directory containing external programs.
+# (NOTE: if a file named 'AUTOSTART' exists in this
+# directory, this file contains the name of all
+# external programs to start (1 per line)
+# -b, --bind=IP if the machin have more than one external IP
+# -l, --linkdir=DIRECTORY name of the directory containing plugins.
+# (NOTE: if a file named 'AUTOSTART' exists in this
+# directory, this file contains the name of all
+# plugins to load on start (1 per line)
+DCHUB_OPTS="-U nobody"
diff --git a/net-p2p/dchub/files/dchub.init.d b/net-p2p/dchub/files/dchub.init.d
new file mode 100644
index 000000000000..d467affcac4b
--- /dev/null
+++ b/net-p2p/dchub/files/dchub.init.d
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/dchub/files/dchub.init.d,v 1.1 2003/01/26 23:18:33 vapier Exp $
+
+# we define these 2 values here because they're mandatory
+DCHUB_CONF="${DCHUB_CONF_DIR}/dchub.conf.db"
+DCHUB_PASS="${DCHUB_CONF_DIR}/dchub.passwd"
+DCHUB_REQ="-c ${DCHUB_CONF} -u ${DCHUB_PASS}"
+
+depend() {
+ need net
+}
+
+setup() {
+ result=0
+ if [ ! -e ${DCHUB_CONF} ] ; then
+ ebegin "Initializing dchub database"
+ dchub --init ${DCHUB_REQ}
+ result=$?
+ eend ${result}
+ fi
+ return ${result}
+}
+
+start() {
+ setup || return 1
+
+ ebegin "Starting direct connect hub..."
+ dchub ${DCHUB_REQ} ${DCHUB_OPTS} >& /dev/null &
+ result=$?
+ echo $!>/var/run/dchub.pid
+ eend ${result}
+}
+
+stop() {
+ ebegin "Stopping direct connect hub..."
+ kill `cat /var/run/dchub.pid`
+ eend $?
+}
diff --git a/net-p2p/dchub/files/digest-dchub-0.2.5 b/net-p2p/dchub/files/digest-dchub-0.2.5
new file mode 100644
index 000000000000..8386571d5275
--- /dev/null
+++ b/net-p2p/dchub/files/digest-dchub-0.2.5
@@ -0,0 +1 @@
+MD5 e544fff4ce7ac48062272aec895b2e77 dchub-0.2.5.tar.gz 232538