summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Blas Izquierdo Riera (klondike) <klondike@xiscosoft.es>2014-10-23 20:00:11 +0200
committerFrancisco Blas Izquierdo Riera (klondike) <klondike@xiscosoft.es>2014-10-23 20:00:11 +0200
commit2f6b000126aa24720f16a286cf711c1122c25d9f (patch)
tree50ee12438be86a509f86c41045b0f745c3bfa659 /net-p2p/uhub/files/uhub.initd
parentUpdate EAPI and fix URL (diff)
downloadklondike-2f6b000126aa24720f16a286cf711c1122c25d9f.tar.gz
klondike-2f6b000126aa24720f16a286cf711c1122c25d9f.tar.bz2
klondike-2f6b000126aa24720f16a286cf711c1122c25d9f.zip
Add live ebuild for uhub
Package-Manager: portage-2.2.8-r2 Manifest-Sign-Key: 0xA5C1A1D24B128E52
Diffstat (limited to 'net-p2p/uhub/files/uhub.initd')
-rw-r--r--net-p2p/uhub/files/uhub.initd33
1 files changed, 33 insertions, 0 deletions
diff --git a/net-p2p/uhub/files/uhub.initd b/net-p2p/uhub/files/uhub.initd
new file mode 100644
index 0000000..38ee6d5
--- /dev/null
+++ b/net-p2p/uhub/files/uhub.initd
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/files/nginx.initd,v 1.1 2012/02/11 10:17:30 hollow Exp $
+
+extra_started_commands="reload"
+
+description="High performance peer-to-peer hub for the ADC network"
+description_reload="Reload uHub configuration and re-read log file"
+
+command="/usr/bin/uhub"
+command_args="-p ${pidfile} ${UHUBOPTIONS}"
+pidfile="/var/run/uhub.pid"
+
+depend() {
+ use dns logger netmount
+}
+
+start_pre() {
+ touch "${UHUB_LOG}"
+ chown "${UHUB_USER}:${UHUB_GROUP}" "${UHUB_LOG}"
+}
+
+
+stop_post() {
+ rm -f ${pidfile}
+}
+
+reload() {
+ ebegin "Reloading uHub configuration"
+ kill -HUP `cat ${pidfile}` &>/dev/null
+ eend $? "Failed to reload uHub"
+}