summaryrefslogtreecommitdiff
blob: 00ca2c80ac3fe0d20265431b9c59c2eab5273b3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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="${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 ${pidfile}
}

reload() {
	ebegin "Reloading uHub configuration"
	kill -HUP `cat ${pidfile}` &>/dev/null
	eend $? "Failed to reload uHub"
}