diff -u apache2-2.2.8/debian/changelog apache2-2.2.8/debian/changelog --- apache2-2.2.8/debian/changelog +++ apache2-2.2.8/debian/changelog @@ -1,3 +1,10 @@ +apache2 (2.2.8-1ubuntu1) hardy; urgency=low + + * debian/apache2.2-common.apache2.init: LSB requires "status" section in + init scripts, (LP: #) + + -- Dustin Kirkland Tue, 11 Mar 2008 22:12:53 -0500 + apache2 (2.2.8-1) unstable; urgency=low * New upstream version: diff -u apache2-2.2.8/debian/apache2.2-common.apache2.init apache2-2.2.8/debian/apache2.2-common.apache2.init --- apache2-2.2.8/debian/apache2.2-common.apache2.init +++ apache2-2.2.8/debian/apache2.2-common.apache2.init @@ -65,7 +65,7 @@ pidof_apache() { # if pidof is null for some reasons the script exits automagically # classified as good/unknown feature - PIDS=`pidof apache2` || true + PIDS=`pidof apache2 || true` || true PFILE=`. /etc/apache2/envvars ; echo $APACHE_PID_FILE` if [ -z "$PFILE" ] ; then @@ -190,8 +190,17 @@ stop_htcacheclean log_end_msg 0 ;; + status) + if pidof_apache ; then + log_success_msg "Apache is running." + exit 0 + else + log_failure_msg "Apache is not running." + exit 1 + fi + ;; *) - log_success_msg "Usage: /etc/init.d/apache2 {start|stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean}" + log_success_msg "Usage: /etc/init.d/apache2 {start|stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}" exit 1 ;; esac