diff options
author | Stefan Fritsch <sf@debian.org> | 2008-03-13 19:21:26 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@sfritsch.de> | 2012-01-02 10:36:51 +0100 |
commit | 4cf2527b1ea49db58aa984270cc512974e1a9e00 (patch) | |
tree | db625478cd9f599d3954036ccfdab5a8ed5185fd | |
parent | 7f47876041fc795e7a35f0ceda8347ec0ecf4f18 (diff) | |
download | apache2-4cf2527b1ea49db58aa984270cc512974e1a9e00.tar.gz |
Add 'status' function to init script
git-svn-id: svn+ssh://svn.debian.org/svn/pkg-apache/trunk/apache2@613 01b336ce-410b-0410-9a02-a0e7f243c266
-rw-r--r-- | debian/apache2.2-common.apache2.init | 12 | ||||
-rw-r--r-- | debian/changelog | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/debian/apache2.2-common.apache2.init b/debian/apache2.2-common.apache2.init index ccbbba82..6ee9ffb1 100644 --- a/debian/apache2.2-common.apache2.init +++ b/debian/apache2.2-common.apache2.init @@ -190,8 +190,18 @@ case $1 in stop_htcacheclean log_end_msg 0 ;; + status) + PID=$(pidof_apache) + if [ -n "$PID" ]; then + log_success_msg "Apache is running (pid $PID)." + 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 diff --git a/debian/changelog b/debian/changelog index abd58200..4af3a43b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ apache2 (2.2.8-3) UNRELEASED; urgency=low * Introduce APACHE_RUN_DIR and APACHE_LOCK_DIR in apache2ctl. Also, make it use APACHE_RUN_USER instead of APACHE2_RUN_USER, to be consistent with apache2.conf. + * Add 'status' function to init script (adapted from patch by Dustin + Kirkland). * Remove Fabio M. Di Nitto from the uploaders field (thanks for your work). -- Stefan Fritsch <sf@debian.org> Wed, 12 Mar 2008 17:55:40 +0100 |