aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPDATING11
-rw-r--r--www/lighttpd/Makefile1
-rw-r--r--www/lighttpd/files/lighttpd.sh.in44
3 files changed, 33 insertions, 23 deletions
diff --git a/UPDATING b/UPDATING
index 47bd86508800..fbcced1effb6 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,17 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20120616:
+ AFFECTS: users of www/lighttpd
+ AUTHOR: mm@FreeBSD.org
+
+ The lighttpd startup script has been changed and is now compatible to the
+ apache startup script. The "reload" subcommand now sends a SIGHUP to the
+ process and triggers cycling of log files. The new command "graceful"
+ performs a graceful restart (similiar to former "reload") and "gracefulstop"
+ performs a graceful stop. The "check" command has been replaced with
+ the "configtest" command.
+
20120615:
AFFECTS: users of databases/akonadi
AUTHOR: kde@FreeBSD.org
diff --git a/www/lighttpd/Makefile b/www/lighttpd/Makefile
index a63e86bf8f8f..9304a9a2bf75 100644
--- a/www/lighttpd/Makefile
+++ b/www/lighttpd/Makefile
@@ -7,6 +7,7 @@
PORTNAME?= lighttpd
PORTVERSION= 1.4.31
+PORTREVISION= 1
CATEGORIES?= www
MASTER_SITES?= http://download.lighttpd.net/lighttpd/releases-1.4.x/
diff --git a/www/lighttpd/files/lighttpd.sh.in b/www/lighttpd/files/lighttpd.sh.in
index aa86640603c1..3c8c37b0a227 100644
--- a/www/lighttpd/files/lighttpd.sh.in
+++ b/www/lighttpd/files/lighttpd.sh.in
@@ -49,17 +49,16 @@ fi
command=%%PREFIX%%/sbin/lighttpd
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"
+restart_precmd="lighttpd_checkconfig"
+graceful_cmd="lighttpd_graceful"
+gracefulstop_cmd="lighttpd_gracefulstop"
+configtest_cmd="lighttpd_checkconfig"
+extra_commands="reload graceful gracefulstop configtest"
command_args="-f ${lighttpd_conf}"
pidfile=${lighttpd_pidfile}
required_files=${lighttpd_conf}
-check_deprecated()
+lighttpd_check_deprecated()
{
if [ -n "${deprecated_conf}" ]; then
echo ""
@@ -70,33 +69,27 @@ check_deprecated()
fi
}
-checkconfig()
+lighttpd_checkconfig()
{
echo "Performing sanity check on ${name} configuration:"
eval "${command} ${command_args} -t"
}
-stop_postcmd()
-{
- rm -f ${pidfile}
-}
-
-reload_precmd()
+lighttpd_gracefulstop()
{
- if checkconfig; then
- echo "Performing a graceful restart"
- else
- return 1
- fi
+ echo "Stopping ${name} gracefully."
+ sig_reload="INT"
+ run_rc_command reload
}
-reload_postcmd()
+lighttpd_graceful()
{
+ lighttpd_gracefulstop
rm -f ${pidfile}
run_rc_command start
}
-run_instance()
+lighttpd_run_instance()
{
_i="$1"
_rcmd="$2"
@@ -110,6 +103,11 @@ run_instance()
run_rc_command ${_rcmd}
}
+stop_postcmd()
+{
+ rm -f ${pidfile}
+}
+
if [ -n "${lighttpd_instances}" ]; then
_orig_name="${name}"
_run_cmd="$1"
@@ -131,9 +129,9 @@ if [ -n "${lighttpd_instances}" ]; then
_runlist="${lighttpd_instances}"
fi
for _in in ${_runlist}; do
- run_instance $_in $_run_cmd
+ lighttpd_run_instance $_in $_run_cmd
done
else
- start_precmd="check_deprecated"
+ start_precmd="lighttpd_check_deprecated"
run_rc_command "$1"
fi