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