From: Danny Al-Gaaf Date: Thu, 6 Jun 2013 13:33:23 +0000 (+0200) Subject: init-radosgw*: add status X-Git-Tag: v0.65~143^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4ea24ae79faf09b081600f7cd33110b598c8421a;p=ceph.git init-radosgw*: add status Signed-off-by: Danny Al-Gaaf --- diff --git a/src/init-radosgw b/src/init-radosgw index cbeadff61f8..21c1024048c 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 7684edcea1c..92405e2acf2 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