summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-nova
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-06-11 14:20:36 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:56 -0400
commit4b541beb2503394557c504c04ca6bef5d4f75bfd (patch)
tree891055ce98d6068a293450150d517cb00d1ce0d1 /meta-openstack/recipes-devtools/python/python-nova
parentf51277f5f99ffe0d897628d058d9e011bba4d484 (diff)
downloadmeta-cloud-services-4b541beb2503394557c504c04ca6bef5d4f75bfd.tar.gz
python-nova: Added initscripts
Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova-all73
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova-compute71
2 files changed, 144 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-all b/meta-openstack/recipes-devtools/python/python-nova/nova-all
new file mode 100644
index 0000000..5891759
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-nova/nova-all
@@ -0,0 +1,73 @@
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides: nova-all
5# Required-Start: $remote_fs $syslog
6# Required-Stop: $remote_fs $syslog
7# Should-Start: postgresql rabbitmq-server
8# Should-Stop: postgresql rabbitmq-server
9# Default-Start: 3 5
10# Default-Stop: 0 1 2 6
11# Short-Description: OpenStack Compute (Nova)
12# Description: OpenStack Compute (Nova)
13### END INIT INFO
14
15DESC="all nova services"
16DAEMON="/usr/bin/nova-all"
17PIDFILE="/var/run/nova-all.pid"
18
19start ()
20{
21 if [ -e $PIDFILE ]; then
22 PIDDIR=/proc/$(cat $PIDFILE)
23 if [ -d ${PIDDIR} ]; then
24 echo "$DESC already running."
25 exit 1
26 else
27 echo "Removing stale PID file $PIDFILE"
28 rm -f $PIDFILE
29 fi
30 fi
31
32 echo -n "Starting $DESC..."
33
34 start-stop-daemon --start --quiet --background \
35 --pidfile ${PIDFILE} --make-pidfile --exec ${DAEMON}
36
37 if [ $? -eq 0 ]; then
38 echo "done."
39 else
40 echo "failed."
41 fi
42}
43
44stop ()
45{
46 echo -n "Stopping $DESC..."
47 start-stop-daemon --stop --quiet --pidfile $PIDFILE
48 if [ $? -eq 0 ]; then
49 echo "done."
50 else
51 echo "failed."
52 fi
53 rm -f $PIDFILE
54}
55
56case "$1" in
57 start)
58 start
59 ;;
60 stop)
61 stop
62 ;;
63 restart|force-reload)
64 stop
65 start
66 ;;
67 *)
68 echo "Usage: $0 {start|stop|force-reload|restart}"
69 exit 1
70 ;;
71esac
72
73exit 0
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-compute b/meta-openstack/recipes-devtools/python/python-nova/nova-compute
new file mode 100644
index 0000000..024b099
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-nova/nova-compute
@@ -0,0 +1,71 @@
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides: nova-compute
5# Required-Start: $remote_fs $syslog
6# Required-Stop: $remote_fs $syslog
7# Default-Start: 3 5
8# Default-Stop: 0 1 2 6
9# Short-Description: OpenStack Compute (Nova) - compute
10# Description: OpenStack Compute (Nova) - compute
11### END INIT INFO
12
13DESC="nova-compute"
14DAEMON="/usr/bin/nova-compute"
15PIDFILE="/var/run/nova-compute.pid"
16
17start ()
18{
19 if [ -e $PIDFILE ]; then
20 PIDDIR=/proc/$(cat $PIDFILE)
21 if [ -d ${PIDDIR} ]; then
22 echo "$DESC already running."
23 exit 1
24 else
25 echo "Removing stale PID file $PIDFILE"
26 rm -f $PIDFILE
27 fi
28 fi
29
30 echo -n "Starting $DESC..."
31
32 start-stop-daemon --start --quiet --background \
33 --pidfile ${PIDFILE} --make-pidfile --exec ${DAEMON}
34
35 if [ $? -eq 0 ]; then
36 echo "done."
37 else
38 echo "failed."
39 fi
40}
41
42stop ()
43{
44 echo -n "Stopping $DESC..."
45 start-stop-daemon --stop --quiet --pidfile $PIDFILE
46 if [ $? -eq 0 ]; then
47 echo "done."
48 else
49 echo "failed."
50 fi
51 rm -f $PIDFILE
52}
53
54case "$1" in
55 start)
56 start
57 ;;
58 stop)
59 stop
60 ;;
61 restart|force-reload)
62 stop
63 start
64 ;;
65 *)
66 echo "Usage: $0 {start|stop|force-reload|restart}"
67 exit 1
68 ;;
69esac
70
71exit 0