]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
init-radosgw*: add status
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 6 Jun 2013 13:33:23 +0000 (15:33 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sat, 7 Sep 2013 17:30:52 +0000 (19:30 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 385457f8d871238a896229d0c2cbb25646969f6a)

src/init-radosgw
src/init-radosgw.sysv

index cbeadff61f86a63adf9643ba5fe5dd4fa98ff6bb..21c1024048c2163d22b14fe0c646c1f7a3f32380 100644 (file)
@@ -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
index aa76fb9e849b68b2aa352cdfb77824ce36f9e851..c04649b01d462139d61f32353ef73cc50ab5037e 100644 (file)
@@ -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