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-consoleauth110
1 files changed, 0 insertions, 110 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth b/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth
deleted file mode 100644
index 9a74107..0000000
--- a/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth
+++ /dev/null
@@ -1,110 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: nova-consoleauth
4# Required-Start: $remote_fs $syslog
5# Required-Stop: $remote_fs $syslog
6# Should-Start: libvirt-bin
7# Should-Stop: libvirt-bin
8# Default-Start: 2 3 4 5
9# Default-Stop: 0 1 6
10# Short-Description: nova-consoleauth service
11# Description: Provides console services for the openstack
12# cloud computing system
13### END INIT INFO
14
15
16set -e
17
18DAEMON=/usr/bin/nova-consoleauth
19DAEMON_ARGS="--log-dir=/var/log/nova "
20PIDFILE=/var/run/nova/nova-consoleauth.pid
21
22ENABLED=true
23
24if test -f /etc/default/nova-consoleauth; then
25 . /etc/default/nova-consoleauth
26fi
27
28mkdir -p /var/run/nova
29chown nova:root /var/run/nova/
30
31mkdir -p /var/lock/nova
32chown nova:root /var/lock/nova/
33
34#uid="$(getent passwd nova | cut -f3 -d:)"
35#gid="$(getent passwd nova | cut -f4 -d:)"
36
37. /lib/lsb/init-functions
38
39export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
40export TMPDIR=/var/lib/nova/tmp
41
42if ! [ -x ${DAEMON} ] ; then
43 exit 0
44fi
45
46DESC="nova console"
47status()
48{
49 pid=`cat $PIDFILE 2>/dev/null`
50 if [ -n "$pid" ]; then
51 if ps -p $pid > /dev/null 2>&1 ; then
52 echo "$DESC is running"
53 return
54 fi
55 fi
56 echo "$DESC is not running"
57}
58
59case "$1" in
60 start)
61 test "$ENABLED" = "true" || exit 0
62
63 if [ -e $PIDFILE ]; then
64 PIDDIR=/proc/$(cat $PIDFILE)
65 if [ -d ${PIDDIR} ]; then
66 echo "$DESC already running."
67 exit 1
68 else
69 echo "Removing stale PID file $PIDFILE"
70 rm -f $PIDFILE
71 fi
72 fi
73 PIDDIR=`dirname $PIDFILE`
74 if [ ! -d $PIDDIR ]; then
75 mkdir -p $PIDDIR
76 chown nova $PIDDIR
77 fi
78
79 if [ ! -d /var/log/nova ]; then
80 mkdir /var/log/nova
81 fi
82
83 echo "Starting nova console" "nova-consoleauth"
84 start-stop-daemon --start -b -m --pidfile $PIDFILE \
85 --exec ${DAEMON} -- ${DAEMON_ARGS}
86 log_end_msg $?
87 ;;
88 stop)
89 test "$ENABLED" = "true" || exit 0
90 echo "Stopping nova console" "nova-consoleauth"
91 start-stop-daemon --stop --oknodo --pidfile ${PIDFILE}
92 log_end_msg $?
93 ;;
94 restart|force-reload|reload)
95 test "$ENABLED" = "true" || exit 1
96 $0 stop
97 sleep 1
98 $0 start
99 ;;
100 status)
101 test "$ENABLED" = "true" || exit 0
102 status
103 ;;
104 *)
105 echo "Usage: /etc/init.d/nova-consoleauth {start|stop|restart|force-reload|status|reload}"
106 exit 1
107 ;;
108esac
109
110exit 0