Import www/cherokee version 1.2.101_3
[dports.git] / www / cherokee / files / cherokee.in
1 #!/bin/sh
2 #
3 # $FreeBSD: ports/www/cherokee/files/cherokee.in,v 1.2 2012/11/17 06:02:29 svnexp Exp $
4 #
5 # PROVIDE: cherokee
6 # REQUIRE: DAEMON
7 # KEYWORD: shutdown
8 #
9 # Add the following lines to /etc/rc.conf to enable cherokee:
10 #
11 # cherokee_enable (bool):       Set it to "YES" to enable cherokee
12 #                               Default is "NO".
13 # cherokee_conf (path):         Set full path to config file.
14 #                               Default is "%%PREFIX%%/etc/cherokee/cherokee.conf".
15 #
16
17 . /etc/rc.subr
18
19 name="cherokee"
20 rcvar=cherokee_enable
21
22 load_rc_config $name
23
24 : ${cherokee_enable="NO"}
25 : ${cherokee_conf="%%PREFIX%%/etc/cherokee/cherokee.conf"}
26
27 command=%%PREFIX%%/sbin/cherokee
28 command_args="-C ${cherokee_conf} -d"
29 pidfile=/var/run/cherokee.pid
30 required_files=${cherokee_conf}
31 stop_postcmd=stop_postcmd
32
33 stop_postcmd()
34 {
35         rm -f ${pidfile}
36 }
37
38 run_rc_command "$1"