Point upstart scripts at venv binaries

This commit is contained in:
Corey Bryant 2015-05-05 19:48:05 +00:00
parent 8215297109
commit e2615d975e
2 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,7 @@ from charmhelpers.contrib.openstack.utils import (
from charmhelpers.core.hookenv import (
config,
charm_dir,
log,
)
@ -383,10 +384,12 @@ def git_post_install(projects_yaml):
render('git/neutron_sudoers', '/etc/sudoers.d/neutron_sudoers', {},
perms=0o440)
bin_dir = os.path.join(charm_dir(), 'venv/bin')
neutron_api_context = {
'service_description': 'Neutron API server',
'charm_name': 'neutron-api',
'process_name': 'neutron-server',
'executable_name': os.path.join(bin_dir, 'neutron-server'),
}
# NOTE(coreycb): Needs systemd support

View File

@ -16,7 +16,7 @@ end script
script
[ -r /etc/default/{{ process_name }} ] && . /etc/default/{{ process_name }}
[ -r "$NEUTRON_PLUGIN_CONFIG" ] && CONF_ARG="--config-file $NEUTRON_PLUGIN_CONFIG"
exec start-stop-daemon --start --chuid neutron --exec /usr/local/bin/neutron-server -- \
exec start-stop-daemon --start --chuid neutron --exec {{ executable_name }} -- \
--config-file /etc/neutron/neutron.conf \
--log-file /var/log/neutron/server.log $CONF_ARG
end script