mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
452ac10de9
- Add workaround to enable IPV6 in lighttpd.conf [2] - Add support to graceful restart [3] PR: 107599 [1], 110371 [2], 110683 [3] Submitted by: Dazza<dazza___luckydonkey.com> [1], Joseph Terner<jtsn___gmx.de> [2], Peter Beckman <beckman___purplecow.com> [3]
62 lines
1.1 KiB
Bash
62 lines
1.1 KiB
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"
|
|
reload_precmd=reload_precmd
|
|
reload_postcmd=reload_postcmd
|
|
sig_reload="-INT"
|
|
check_cmd="checkconfig"
|
|
extra_commands="reload check"
|
|
|
|
checkconfig()
|
|
{
|
|
echo "Performing sanity check on ${name} configuration:"
|
|
eval "${command} ${command_args} -t"
|
|
}
|
|
|
|
stop_postcmd()
|
|
{
|
|
rm -f ${pidfile}
|
|
}
|
|
|
|
reload_precmd()
|
|
{
|
|
echo "Stoping ${name} and start gracefully."
|
|
}
|
|
|
|
reload_postcmd()
|
|
{
|
|
rm -f ${pidfile}
|
|
run_rc_command start
|
|
}
|
|
|
|
run_rc_command "$1"
|