/[gentoo-x86]/www-servers/cherokee/files/cherokee-initd-1.2.99
Gentoo

Contents of /www-servers/cherokee/files/cherokee-initd-1.2.99

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Sep 16 11:57:03 2011 UTC (3 years, 3 months ago) by matsuu
Branch: MAIN
CVS Tags: HEAD
Version bumped. Added cherokee.logrotate. Fixed graceful and reload in init.d, bug #348929. Clean up.

(Portage version: 2.1.10.15/cvs/Linux x86_64)

1 #!/sbin/runscript
2 # Copyright 1999-2011 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4
5 command="/usr/sbin/cherokee"
6 extra_commands="configtest"
7 extra_started_commands="graceful reload"
8
9
10 depend() {
11 need net
12 use dns ldap logger mysql netmount
13 }
14
15 checkconfig() {
16 ${command} -t 1>/dev/null 2>&1
17 ret=$?
18 if [ $ret -ne 0 ]; then
19 eerror "${SVCNAME} has detected an error in your config:"
20 ${command} -t ${CHEROKEE_OPTS}
21 fi
22 return $?
23 }
24
25 configtest() {
26 ebegin "Checking ${SVCNAME} configuration"
27 checkconfig
28 eend $?
29 }
30
31 start() {
32 checkconfig || return 1
33
34 ebegin "Starting ${SVCNAME}"
35 start-stop-daemon --start --quiet \
36 --exec ${command} -- -d ${CHEROKEE_OPTS}
37 eend $?
38 }
39
40 stop() {
41 checkconfig || return 1
42
43 ebegin "Stopping ${SVCNAME}"
44 start-stop-daemon --stop --quiet \
45 --exec ${command}
46 eend $?
47 }
48
49 graceful() {
50 checkconfig || return 1
51
52 ebegin "Restarting ${SVCNAME} and closing all the opened connections"
53 start-stop-daemon \
54 --exec ${command} \
55 --signal USR1
56 eend $?
57 }
58
59 reload() {
60 checkconfig || return 1
61
62 ebegin "Reloading ${SVCNAME} configuration"
63 start-stop-daemon \
64 --exec ${command} \
65 --signal HUP
66 eend $?
67 }

  ViewVC Help
Powered by ViewVC 1.1.20