Package: lighttpd Version: 1.4.22-1 Severity: wishlist Tags: patch User: pet...@debian.org Usertags: initd-status-support
Here is a patch to support the "status" action in the init.d script. I rearranged this a bit so that the status action can be run as non-root, which is a nice secondary feature.
diff -u lighttpd-1.4.23/debian/init.d lighttpd-1.4.23/debian/init.d --- lighttpd-1.4.23/debian/init.d +++ lighttpd-1.4.23/debian/init.d @@ -24,10 +24,12 @@ set -e -# be sure there is a /var/run/lighttpd, even with tmpfs -mkdir -p /var/run/lighttpd > /dev/null 2> /dev/null -chown www-data:www-data /var/run/lighttpd -chmod 0750 /var/run/lighttpd +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 + chown www-data:www-data /var/run/lighttpd + chmod 0750 /var/run/lighttpd +fi . /lib/lsb/init-functions @@ -74,8 +76,11 @@ grep -q `cat $PIDFILE 2>/dev/null` 2>/dev/null ; do sleep 1; done $0 start ;; + status) + status_of_proc $DAEMON $NAME + ;; *) - echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2 exit 1 ;; esac diff -u lighttpd-1.4.23/debian/changelog lighttpd-1.4.23/debian/changelog --- lighttpd-1.4.23/debian/changelog +++ lighttpd-1.4.23/debian/changelog @@ -1,3 +1,10 @@ +lighttpd (1.4.23-3.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Add init.d status support + + -- Peter Eisentraut <pet...@debian.org> Sun, 26 Jul 2009 11:15:24 +0300 + lighttpd (1.4.23-3) unstable; urgency=low * debian/rules: make sure that scripts have proper rights diff -u lighttpd-1.4.23/debian/control lighttpd-1.4.23/debian/control --- lighttpd-1.4.23/debian/control +++ lighttpd-1.4.23/debian/control @@ -17,7 +17,7 @@ Package: lighttpd Homepage: http://www.lighttpd.net Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.0-3), mime-support, libterm-readline-perl-perl +Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.2-13), mime-support, libterm-readline-perl-perl Provides: httpd, httpd-cgi Suggests: openssl, rrdtool, apache2-utils Recommends: spawn-fcgi