From: Danny Al-Gaaf Date: Thu, 6 Jun 2013 13:33:23 +0000 (+0200) Subject: init-radosgw*: add status X-Git-Tag: v0.61.9~13^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1a8347e0d1cafc38259adc1f1a6154fa0d48f1d2;p=ceph.git init-radosgw*: add status Signed-off-by: Danny Al-Gaaf (cherry picked from commit 385457f8d871238a896229d0c2cbb25646969f6a) --- diff --git a/src/init-radosgw b/src/init-radosgw index cbeadff61f86a..21c1024048c21 100644 --- a/src/init-radosgw +++ b/src/init-radosgw @@ -78,8 +78,16 @@ case "$1" in stop) start-stop-daemon --stop -x $RADOSGW --oknodo ;; + status) + if pidof $RADOSGW >/dev/null; then + echo "$RADOSGW is running." + else + echo "$RADOSGW is not running." + RETVAL=1 + fi + ;; *) - echo "Usage: $0 start|stop|restart" >&2 + echo "Usage: $0 start|stop|restart|status" >&2 exit 3 ;; esac diff --git a/src/init-radosgw.sysv b/src/init-radosgw.sysv index aa76fb9e849b6..c04649b01d462 100644 --- a/src/init-radosgw.sysv +++ b/src/init-radosgw.sysv @@ -84,8 +84,16 @@ case "$1" in killproc $RADOSGW echo "Stopping radosgw..." ;; + status) + if pidof $RADOSGW >/dev/null; then + echo "$RADOSGW is running." + else + echo "$RADOSGW is not running." + RETVAL=1 + fi + ;; *) - echo "Usage: $0 start|stop|restart" >&2 + echo "Usage: $0 start|stop|restart|status" >&2 exit 3 ;; esac