mirror of
https://git.freebsd.org/ports.git
synced 2025-07-15 00:09:15 -04:00
- Remove BEFORE line and FreeBSD in KEYWORD PR: 92108 [1] Submitted by: Lapo Luchini <lapo@lapo.it> [1] Approved by: maintainer timeout, 16 days
45 lines
852 B
Bash
45 lines
852 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: lighttpd
|
|
# REQUIRE: %%REQUIRE%%
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable lighttpd:
|
|
#
|
|
# lighttpd_enable (bool): Set it to "YES" to enable lighttpd
|
|
# Default is "NO".
|
|
# lighttpd_conf (path): Set full path to config file.
|
|
# Default is "%%PREFIX%%/etc/lighttpd.conf".
|
|
#
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
name="lighttpd"
|
|
rcvar=`set_rcvar`
|
|
|
|
load_rc_config $name
|
|
|
|
: ${lighttpd_enable="NO"}
|
|
: ${lighttpd_conf="%%PREFIX%%/etc/lighttpd.conf"}
|
|
|
|
command=%%PREFIX%%/sbin/lighttpd
|
|
command_args="-f ${lighttpd_conf}"
|
|
pidfile=/var/run/lighttpd.pid
|
|
required_files=${lighttpd_conf}
|
|
stop_postcmd=stop_postcmd
|
|
restart_precmd="checkconfig"
|
|
|
|
checkconfig()
|
|
{
|
|
echo "Performing sanity check on ${name} configuration:"
|
|
eval "${command} ${command_args} -t"
|
|
}
|
|
|
|
stop_postcmd()
|
|
{
|
|
rm -f ${pidfile}
|
|
}
|
|
|
|
run_rc_command "$1"
|