summaryrefslogtreecommitdiff
blob: 046ef70cacea69bdeb82368448aa731bdee9f51f (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
36
37
38
39
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

opts="graceful reload"

depend() {
	need net
}

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

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

graceful() {
	ebegin "Gracefully restarting Cherokee Web Server"
	start-stop-daemon \
		--exec /usr/sbin/cherokee \
		--signal HUP
	eend $?
}

reload() {
	ebegin "Restarting Cherokee Web Server and closing all open connections"
	start-stop-daemon \
		--exec /usr/sbin/cherokee \
		--signal USR1
	eend $?
}