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