diff options
Diffstat (limited to 'net-p2p/amule/files')
-rw-r--r-- | net-p2p/amule/files/amuled.confd | 13 | ||||
-rw-r--r-- | net-p2p/amule/files/amuled.initd | 47 | ||||
-rw-r--r-- | net-p2p/amule/files/amuleweb.confd | 23 | ||||
-rw-r--r-- | net-p2p/amule/files/amuleweb.initd | 48 | ||||
-rw-r--r-- | net-p2p/amule/files/digest-amule-2.0.3 | 1 |
5 files changed, 132 insertions, 0 deletions
diff --git a/net-p2p/amule/files/amuled.confd b/net-p2p/amule/files/amuled.confd new file mode 100644 index 000000000000..2911297d16ce --- /dev/null +++ b/net-p2p/amule/files/amuled.confd @@ -0,0 +1,13 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/amule/files/amuled.confd,v 1.1 2005/07/10 15:02:47 chainsaw Exp $ + +# owner of amuled process (must be existing) +AMULEUSER="p2p" + +# home directory for amuled (must be existing) +AMULEHOME="/home/p2p" + +# log file (/dev/null for nowhere) +LOG=/var/log/amuled.log + diff --git a/net-p2p/amule/files/amuled.initd b/net-p2p/amule/files/amuled.initd new file mode 100644 index 000000000000..236de692d691 --- /dev/null +++ b/net-p2p/amule/files/amuled.initd @@ -0,0 +1,47 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/amule/files/amuled.initd,v 1.1 2005/07/10 15:02:47 chainsaw Exp $ + +depend() { + need net +} + +start() { + if ! test -f "${AMULEHOME}/.eMule"; then + eerror "You must start and configure amuled before launch it. Sorry." + return 1 + fi + + if pgrep -u ${AMULEUSER} amuled >/dev/null; then + eerror "An instance of aMule webserver is already running" + return 1 + fi + + rm /var/run/amuled.pid + + ebegin "Starting aMule Daemon" + env HOME="${AMULEHOME}" start-stop-daemon --start \ + --quiet --background \ + --make-pidfile --pidfile /var/run/amuled.pid \ + -c ${AMULEUSER} \ + -x /usr/bin/amuled >${LOG} + + sleep 2 + if ! pgrep -u ${AMULEUSER} amuled > /dev/null; then + eerror "aMule daemon can't be started! Check logfile: ${LOG}" + fi + eend $? +} + +stop() { + ebegin "Stopping aMule daemon" + start-stop-daemon --oknodo --stop --pidfile /var/run/amuled.pid &>/dev/null + eend $? +} + +restart() { + svc_stop + sleep 3 + svc_start +} diff --git a/net-p2p/amule/files/amuleweb.confd b/net-p2p/amule/files/amuleweb.confd new file mode 100644 index 000000000000..4bb37b3dd949 --- /dev/null +++ b/net-p2p/amule/files/amuleweb.confd @@ -0,0 +1,23 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/amule/files/amuleweb.confd,v 1.1 2005/07/10 15:02:47 chainsaw Exp $ + +# owner of amuleweb process (must be existing) +AMULEUSER="p2p" + +# home directory for amuleweb (from where to read configuration) (must be existing) +AMULEHOME="/home/p2p" + +# log file (/dev/null for nowhere) +LOG=/var/log/amuleweb.log + +# aMule password (note: not your webserver password, but the external +# connection one) +AMULEPWD="secret" + +# aMule host (this could be a remote host or usually localhost) +AMULEHOST="localhost" + +# aMule external connection port +AMULEPORT="4712" + diff --git a/net-p2p/amule/files/amuleweb.initd b/net-p2p/amule/files/amuleweb.initd new file mode 100644 index 000000000000..00036b4f0521 --- /dev/null +++ b/net-p2p/amule/files/amuleweb.initd @@ -0,0 +1,48 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/amule/files/amuleweb.initd,v 1.1 2005/07/10 15:02:47 chainsaw Exp $ + +depend() { + need net + use amuled +} + +start() { + if ! test -f "${AMULEHOME}/.eMule"; then + eerror "You must start and configure amuleweb before launch it. Sorry." + return 1 + fi + + if pgrep -u ${AMULEUSER} amuleweb >/dev/null; then + eerror "An instance of aMule webserver is already running" + return 1 + fi + + rm /var/run/amuleweb.pid + + OPTIONS="-rh ${AMULEHOST} -p ${AMULEPORT} -pw ${AMULEPWD}" + + einfo $OPTIONS + ebegin "Starting aMule WebServer" + env HOME="${AMULEHOME}" start-stop-daemon --start \ + --quiet -b \ + --make-pidfile --pidfile /var/run/amuleweb.pid \ + -c ${AMULEUSER} \ + -x /usr/bin/amuleweb -- ${OPTIONS} &>${LOG} + + sleep 1 + if ! pgrep -u ${AMULEUSER} amuleweb > /dev/null; then + eerror "aMule daemon can't be started! Check logfile: ${LOG}" + eend 1 + return 1 + fi + eend $? +} + +stop() { + ebegin "Stopping aMule WebServer" + start-stop-daemon --oknodo --stop --pidfile /var/run/amuleweb.pid &>/dev/null + eend $? +} + diff --git a/net-p2p/amule/files/digest-amule-2.0.3 b/net-p2p/amule/files/digest-amule-2.0.3 new file mode 100644 index 000000000000..a14f56f2afdf --- /dev/null +++ b/net-p2p/amule/files/digest-amule-2.0.3 @@ -0,0 +1 @@ +MD5 204ca3472a773d8fa484d0a0787bf0d7 aMule-2.0.3.tar.bz2 2154288 |