9a34f271f7
The init/systemd scripts support dynamic parameters to be passed to init services, however there is a static --log-file option that was configured to be passed to ALL services using the init templates. For services that are implemented which do not support --log-file parameters this causes a startup failure ie. calico-felix: error: no such option: --log-file This change moves the --log-file parameter into the neutron_services dictionary, allowing the parameter to be passed on a per-service basis. Change-Id: I9e98f730e3d167feb40c2f7e898c10f53041bffd
43 lines
1.1 KiB
Django/Jinja
43 lines
1.1 KiB
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
description "{{ program_name }}"
|
|
author "Kevin Carter <kevin.carter@rackspace.com>"
|
|
|
|
start on runlevel [2345]
|
|
stop on runlevel [016]
|
|
|
|
respawn
|
|
respawn limit 10 5
|
|
|
|
# Set the RUNBIN environment variable
|
|
env RUNBIN="{{ neutron_bin }}/{{ program_name }}"
|
|
|
|
# Change directory to service users home
|
|
chdir "{{ service_home }}"
|
|
|
|
# Pre start actions
|
|
pre-start script
|
|
mkdir -p "/var/run/{{ program_name }}"
|
|
chown {{ system_user }}:{{ system_group }} "/var/run/{{ program_name }}"
|
|
|
|
mkdir -p "/var/lock/{{ program_name }}"
|
|
chown {{ system_user }}:{{ system_group }} "/var/lock/{{ program_name }}"
|
|
|
|
. {{ neutron_bin }}/activate
|
|
|
|
|
|
end script
|
|
|
|
# Post stop actions
|
|
post-stop script
|
|
rm "/var/run/{{ program_name }}/{{ program_name }}.pid"
|
|
end script
|
|
|
|
# Run the start up job
|
|
exec start-stop-daemon --start \
|
|
--chuid {{ system_user }} \
|
|
--make-pidfile \
|
|
--pidfile /var/run/{{ program_name }}/{{ program_name }}.pid \
|
|
--exec "{{ program_override|default('$RUNBIN') }}" \
|
|
-- {{ program_config_options|default('') }}
|