summaryrefslogtreecommitdiff
blob: 7a4a1fe83ab954fa3ae14c9a8234ad4b1c25fc64 (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
34
35
#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

depend() {
	need net
}

start() {
	ebegin "Starting ${SVCNAME}"

	if [[ -f "/var/run/${SVCNAME}.pid" ]] ; then
		rm -f "/var/run/${SVCNAME}.pid"
	fi

	start-stop-daemon \
		--start \
		--background \
		--make-pidfile \
		--pidfile "/var/run/${SVCNAME}.pid" \
		--exec /usr/sbin/areca-http
	eend $?
}

stop() {
	ebegin "Stopping ${SVCNAME}"

	start-stop-daemon \
		--stop \
		--signal 9 \
		--pidfile "/var/run/${SVCNAME}.pid" \
		--exec /usr/sbin/areca-http
	eend $?
}