summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy19
1 files changed, 16 insertions, 3 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy b/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy
index 76cd1df..c976194 100644
--- a/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy
+++ b/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy
@@ -40,6 +40,19 @@ if ! [ -x ${DAEMON} ] ; then
40 exit 0 40 exit 0
41fi 41fi
42 42
43DESC="nova vnc proxy"
44status()
45{
46 pid=`cat $PIDFILE 2>/dev/null`
47 if [ -n "$pid" ]; then
48 if ps -p $pid >&- ; then
49 echo "$DESC is running"
50 return
51 fi
52 fi
53 echo "$DESC is not running"
54}
55
43case "$1" in 56case "$1" in
44 start) 57 start)
45 test "$ENABLED" = "true" || exit 0 58 test "$ENABLED" = "true" || exit 0
@@ -53,7 +66,7 @@ case "$1" in
53 start-stop-daemon --stop --oknodo --pidfile ${PIDFILE} 66 start-stop-daemon --stop --oknodo --pidfile ${PIDFILE}
54 log_end_msg $? 67 log_end_msg $?
55 ;; 68 ;;
56 restart|force-reload) 69 restart|force-reload|reload)
57 test "$ENABLED" = "true" || exit 1 70 test "$ENABLED" = "true" || exit 1
58 $0 stop 71 $0 stop
59 sleep 1 72 sleep 1
@@ -61,10 +74,10 @@ case "$1" in
61 ;; 74 ;;
62 status) 75 status)
63 test "$ENABLED" = "true" || exit 0 76 test "$ENABLED" = "true" || exit 0
64 status_of_proc -p $PIDFILE $DAEMON nova-novncproxy && exit 0 || exit $? 77 status
65 ;; 78 ;;
66 *) 79 *)
67 echo "Usage: /etc/init.d/nova-novncproxy {start|stop|restart|force-reload|status}" 80 echo "Usage: /etc/init.d/nova-novncproxy {start|stop|restart|force-reload|status|reload|status}"
68 exit 1 81 exit 1
69 ;; 82 ;;
70esac 83esac