summaryrefslogtreecommitdiff
blob: e99d0c1ee169a19fd3a826f200438d83e204c3da (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="gracefull 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 $?
}

gracefull() {
	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 $?
}