~jamesbeedy/charms/trusty/nova-compute/next

« back to all changes in this revision

Viewing changes to templates/git/upstart/nova-compute.upstart

  • Committer: Corey Bryant
  • Date: 2015-04-15 14:21:42 UTC
  • mfrom: (121 nova-compute)
  • mto: This revision was merged to the branch mainline in revision 123.
  • Revision ID: corey.bryant@canonical.com-20150415142142-alq9gvj11khg6kxg
Deploy from source

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
description "{{ service_description }}"
 
2
author "Juju {{ service_name }} Charm <juju@localhost>"
 
3
 
 
4
start on runlevel [2345]
 
5
stop on runlevel [!2345]
 
6
 
 
7
chdir /var/run
 
8
 
 
9
pre-start script
 
10
  mkdir -p /var/run/nova
 
11
  chown nova:root /var/run/nova/
 
12
 
 
13
  mkdir -p /var/lock/nova
 
14
  chown nova:root /var/lock/nova/
 
15
 
 
16
  modprobe nbd
 
17
 
 
18
  # If libvirt-bin is installed, always wait for it to start first
 
19
  if status libvirt-bin; then
 
20
    start wait-for-state WAIT_FOR=libvirt-bin WAIT_STATE=running WAITER={{ process_name }}
 
21
  fi
 
22
end script
 
23
 
 
24
exec start-stop-daemon --start --chuid {{ user_name }} --exec {{ executable_name }} -- \
 
25
     {% for config_file in config_files -%}
 
26
     --config-file={{ config_file }} \
 
27
     {% endfor -%}