From 7954fc77678061c3663e0e4e9ab46939792e7c55 Mon Sep 17 00:00:00 2001 From: Marcus Alves Grando Date: Mon, 6 Feb 2006 12:19:17 +0000 Subject: [PATCH] - Check config when restart rc.d script [1] - Remove BEFORE line and FreeBSD in KEYWORD PR: 92108 [1] Submitted by: Lapo Luchini [1] Approved by: maintainer timeout, 16 days --- www/lighttpd/files/lighttpd.sh.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/www/lighttpd/files/lighttpd.sh.in b/www/lighttpd/files/lighttpd.sh.in index 66a2e24af834..4cb5cb758954 100644 --- a/www/lighttpd/files/lighttpd.sh.in +++ b/www/lighttpd/files/lighttpd.sh.in @@ -4,8 +4,7 @@ # # PROVIDE: lighttpd # REQUIRE: %%REQUIRE%% -# BEFORE: LOGIN -# KEYWORD: FreeBSD shutdown +# KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable lighttpd: # @@ -30,6 +29,13 @@ 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() {