freebsd-ports/www/lighttpd/files/lighttpd.sh.in
Renato Botelho 80799ba3fb - Update to 1.4.1
PR:		ports/85177
Submitted by:	Hendrik Scholz <hendrik@scholz.net> (maintainer)
2005-08-29 10:13:32 +00:00

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"