summaryrefslogtreecommitdiff
blob: b49f347bb399e8dc84744d8fa4f18a7f0492909b (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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/files/cherokee-initd-0.11,v 1.1 2008/12/26 09:04:43 bass Exp $

PIDFILE=/var/run/cherokee.pid

opt="reload"

depend() {
	need net
}

start() {
	ebegin "Starting Cherokee Web Server"
	start-stop-daemon --start -b --pidfile ${PIDFILE} \
		--exec /usr/sbin/cherokee
	eend $?
}

stop() {
	ebegin "Stopping Cherokee Web Server"
	start-stop-daemon --stop --pidfile ${PIDFILE} \
		--exec /usr/sbin/cherokee
	eend $?
}

reload() {
	ebegin "Restarting Cherokee Web Server and closing all open connections"
	start-stop-daemon --stop --pidfile ${PIDFILE} \
		--signal USR1
	eend $?
}