80799ba3fb
PR: ports/85177 Submitted by: Hendrik Scholz <hendrik@scholz.net> (maintainer)
43 lines
639 B
Bash
43 lines
639 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: lighttpd
|
|
# REQUIRE: DAEMON
|
|
# BEFORE: LOGIN
|
|
# KEYWORD: FreeBSD shutdown
|
|
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable lighttpd:
|
|
#
|
|
#lighttpd_enable="YES"
|
|
#
|
|
# See lighttpd(1) for manual
|
|
#
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
name=lighttpd
|
|
rcvar=`set_rcvar`
|
|
|
|
command=%%PREFIX%%/sbin/lighttpd
|
|
pidfile=/var/run/lighttpd.pid
|
|
required_files=${lighttpd_conf}
|
|
|
|
stop_postcmd=stop_postcmd
|
|
|
|
stop_postcmd()
|
|
{
|
|
rm -f $pidfile
|
|
}
|
|
|
|
# set defaults
|
|
|
|
lighttpd_enable=${lighttpd_enable:-"NO"}
|
|
lighttpd_conf=${lighttpd_conf:-"%%PREFIX%%/etc/lighttpd.conf"}
|
|
|
|
load_rc_config $name
|
|
|
|
command_args="-f ${lighttpd_conf}"
|
|
run_rc_command "$1"
|