blob: 4d8c38134b043995e9797e3537b473cf5c2e2c7a (
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
|
#!/usr/bin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
name="lighttpd"
description="Lighttpd web server"
conf_file="${LIGHTTPD_CONF:-/etc/lighttpd/lighttpd.conf}"
supervisor=supervise-daemon
command="/usr/bin/lighttpd"
command_args="-D -f ${conf_file}"
required_files="${conf_file}"
depend() {
need net
use mysql logger spawn-fcgi ldap slapd netmount dns
after firewall
after famd
after sshd
}
checkconfig() {
ebegin "Checking for ${conf_file}"
if [ ! -f "${conf_file}" ] ; then
eerror "${conf_file} does not exist."
fi
eend $?
/usr/bin/lighttpd -t -f "${conf_file}" >/dev/null
}
start_pre() {
checkconfig || return $?
checkpath -d -q -m 0750 /run/lighttpd/
}
|