diff options
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova/nova.init')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-nova/nova.init | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova.init b/meta-openstack/recipes-devtools/python/python-nova/nova.init index c317f84..5d298fd 100644 --- a/meta-openstack/recipes-devtools/python/python-nova/nova.init +++ b/meta-openstack/recipes-devtools/python/python-nova/nova.init | |||
| @@ -57,6 +57,18 @@ stop () | |||
| 57 | rm -f $PIDFILE | 57 | rm -f $PIDFILE |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | status() | ||
| 61 | { | ||
| 62 | pid=`cat $PIDFILE 2>/dev/null` | ||
| 63 | if [ -n "$pid" ]; then | ||
| 64 | if ps -p $pid >&- ; then | ||
| 65 | echo "$DESC is running" | ||
| 66 | return | ||
| 67 | fi | ||
| 68 | fi | ||
| 69 | echo "$DESC is not running" | ||
| 70 | } | ||
| 71 | |||
| 60 | case "$1" in | 72 | case "$1" in |
| 61 | start) | 73 | start) |
| 62 | start | 74 | start |
| @@ -64,12 +76,15 @@ case "$1" in | |||
| 64 | stop) | 76 | stop) |
| 65 | stop | 77 | stop |
| 66 | ;; | 78 | ;; |
| 67 | restart|force-reload) | 79 | restart|force-reload|reload) |
| 68 | stop | 80 | stop |
| 69 | start | 81 | start |
| 70 | ;; | 82 | ;; |
| 83 | status) | ||
| 84 | status | ||
| 85 | ;; | ||
| 71 | *) | 86 | *) |
| 72 | echo "Usage: $0 {start|stop|force-reload|restart}" | 87 | echo "Usage: $0 {start|stop|force-reload|restart|reload|status}" |
| 73 | exit 1 | 88 | exit 1 |
| 74 | ;; | 89 | ;; |
| 75 | esac | 90 | esac |
