diff options
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy')
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy b/meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy deleted file mode 100644 index d58f71e..0000000 --- a/meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | #! /bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: nova-spicehtml5proxy | ||
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-spicehtml5proxy service | ||
11 | # Description: Provides spice html5 proxy services for the openstack | ||
12 | # cloud computing system | ||
13 | ### END INIT INFO | ||
14 | |||
15 | |||
16 | set -e | ||
17 | |||
18 | NAME=nova-spicehtml5proxy | ||
19 | DESC="OpenStack Compute Spice HTML5 Proxy" | ||
20 | SCRIPTNAME=/etc/init.d/$NAME | ||
21 | DAEMON=/usr/bin/nova-spicehtml5proxy | ||
22 | DAEMON_ARGS="" | ||
23 | PIDFILE=/var/run/nova/$NAME.pid | ||
24 | |||
25 | ENABLED=true | ||
26 | |||
27 | if test -f /etc/default/nova-consoleproxy; then | ||
28 | . /etc/default/nova-consoleproxy | ||
29 | fi | ||
30 | |||
31 | if ! [ "${NOVA_CONSOLE_PROXY_TYPE}" = "spicehtml5" ] ; then | ||
32 | exit 0 | ||
33 | fi | ||
34 | |||
35 | mkdir -p /var/run/nova | ||
36 | chown nova:root /var/run/nova/ | ||
37 | |||
38 | mkdir -p /var/lock/nova | ||
39 | chown nova:root /var/lock/nova/ | ||
40 | |||
41 | . /lib/lsb/init-functions | ||
42 | |||
43 | export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" | ||
44 | export TMPDIR=/var/lib/nova/tmp | ||
45 | |||
46 | if ! [ -x ${DAEMON} ] ; then | ||
47 | exit 0 | ||
48 | fi | ||
49 | |||
50 | status() | ||
51 | { | ||
52 | pid=`cat $PIDFILE 2>/dev/null` | ||
53 | if [ -n "$pid" ]; then | ||
54 | if ps -p $pid >&- ; then | ||
55 | echo "$DESC is running" | ||
56 | return | ||
57 | fi | ||
58 | fi | ||
59 | echo "$DESC is not running" | ||
60 | } | ||
61 | |||
62 | case "$1" in | ||
63 | start) | ||
64 | test "$ENABLED" = "true" || exit 0 | ||
65 | echo "Starting $DESC" "$NAME" | ||
66 | start-stop-daemon --start -b -m --pidfile $PIDFILE --exec ${DAEMON} -- ${DAEMON_ARGS} | ||
67 | log_end_msg $? | ||
68 | ;; | ||
69 | stop) | ||
70 | test "$ENABLED" = "true" || exit 0 | ||
71 | echo "Stopping $DESC" "$NAME" | ||
72 | start-stop-daemon --stop --oknodo --pidfile ${PIDFILE} | ||
73 | log_end_msg $? | ||
74 | ;; | ||
75 | restart|force-reload|reload) | ||
76 | test "$ENABLED" = "true" || exit 1 | ||
77 | $0 stop | ||
78 | sleep 1 | ||
79 | $0 start | ||
80 | ;; | ||
81 | status) | ||
82 | test "$ENABLED" = "true" || exit 0 | ||
83 | status | ||
84 | ;; | ||
85 | *) | ||
86 | echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status|reload|status}" | ||
87 | exit 1 | ||
88 | ;; | ||
89 | esac | ||
90 | |||
91 | exit 0 | ||