[pkg-lighttpd] r444 - lighttpd/trunk/debian
Olaf van der Spek
olafvdspek-guest at alioth.debian.org
Sat May 22 20:41:47 UTC 2010
Author: olafvdspek-guest
Date: 2010-05-22 20:41:46 +0000 (Sat, 22 May 2010)
New Revision: 444
Modified:
lighttpd/trunk/debian/lighttpd.init
lighttpd/trunk/debian/lighttpd.logrotate
Log:
added reopen-logs to init script
use reopen-logs for logrotate (closes: 504319)
Modified: lighttpd/trunk/debian/lighttpd.init
===================================================================
--- lighttpd/trunk/debian/lighttpd.init 2010-05-22 20:27:27 UTC (rev 443)
+++ lighttpd/trunk/debian/lighttpd.init 2010-05-22 20:41:46 UTC (rev 444)
@@ -26,9 +26,8 @@
if [ "$1" != status ]; then
# be sure there is a /var/run/lighttpd, even with tmpfs
- mkdir -p /var/run/lighttpd > /dev/null 2> /dev/null
+ mkdir --mode 750 --parents /var/run/lighttpd
chown www-data:www-data /var/run/lighttpd
- chmod 0750 /var/run/lighttpd
fi
. /lib/lsb/init-functions
@@ -71,6 +70,16 @@
log_end_msg 1
fi
;;
+ reopen-logs)
+ log_daemon_msg "Reopening $DESC logs" $NAME
+ if start-stop-daemon --stop --signal HUP --oknodo --quiet \
+ --pidfile $PIDFILE --exec $DAEMON
+ then
+ log_end_msg 0
+ else
+ log_end_msg 1
+ fi
+ ;;
restart)
$0 stop
$0 start
Modified: lighttpd/trunk/debian/lighttpd.logrotate
===================================================================
--- lighttpd/trunk/debian/lighttpd.logrotate 2010-05-22 20:27:27 UTC (rev 443)
+++ lighttpd/trunk/debian/lighttpd.logrotate 2010-05-22 20:41:46 UTC (rev 444)
@@ -7,12 +7,10 @@
notifempty
sharedscripts
postrotate
- if [ -f /var/run/lighttpd.pid ] && ps --pid $(cat /var/run/lighttpd.pid) > /dev/null 2>&1; then \
if [ -x /usr/sbin/invoke-rc.d ]; then \
- invoke-rc.d lighttpd reload > /dev/null 2>&1; \
+ invoke-rc.d lighttpd reopen-logs > /dev/null 2>&1; \
else \
- /etc/init.d/lighttpd reload > /dev/null 2>&1; \
+ /etc/init.d/lighttpd reopen-logs > /dev/null 2>&1; \
fi; \
- fi;
endscript
}
More information about the pkg-lighttpd-maintainers
mailing list