summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-glance/glance.init
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-glance/glance.init')
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance/glance.init20
1 files changed, 18 insertions, 2 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-glance/glance.init b/meta-openstack/recipes-devtools/python/python-glance/glance.init
index c61abaa..def500f 100644
--- a/meta-openstack/recipes-devtools/python/python-glance/glance.init
+++ b/meta-openstack/recipes-devtools/python/python-glance/glance.init
@@ -4,6 +4,7 @@
4# Provides: 4# Provides:
5# Required-Start: $remote_fs $network $syslog 5# Required-Start: $remote_fs $network $syslog
6# Required-Stop: $remote_fs $syslog 6# Required-Stop: $remote_fs $syslog
7# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6 8# Default-Stop: 0 1 6
8# Short-Description: Glance API server 9# Short-Description: Glance API server
9# Description: OpenStack Image Service (code-named Glance) API server 10# Description: OpenStack Image Service (code-named Glance) API server
@@ -57,6 +58,18 @@ stop()
57 rm -f $PIDFILE 58 rm -f $PIDFILE
58} 59}
59 60
61status()
62{
63 pid=`cat $PIDFILE 2>/dev/null`
64 if [ -n "$pid" ]; then
65 if ps -p $pid >&- ; then
66 echo "$DESC is running"
67 return
68 fi
69 fi
70 echo "$DESC is not running"
71}
72
60case "$1" in 73case "$1" in
61 start) 74 start)
62 start 75 start
@@ -64,12 +77,15 @@ case "$1" in
64 stop) 77 stop)
65 stop 78 stop
66 ;; 79 ;;
67 restart|force-reload) 80 restart|force-reload|reload)
68 stop 81 stop
69 start 82 start
70 ;; 83 ;;
84 status)
85 status
86 ;;
71 *) 87 *)
72 echo "Usage: $0 {start|stop|force-reload|restart}" 88 echo "Usage: $0 {start|stop|force-reload|restart|reload|status}"
73 exit 1 89 exit 1
74 ;; 90 ;;
75esac 91esac