openstack-ansible-os_sahara/templates/sahara-systemd-init.j2
Flávio Ramalho c5ecb56867 Implement Ubuntu 16.04 Xenial support
This change adds suport for Ubuntu 16.04 with SystemD
while keeping the support for Ubuntu 14.04 with upstart.

Implements: blueprint support-ubuntu-1604
Change-Id: Iffed984d6c2c881cbac31919dc805b6122dd4f3f
2016-06-16 08:48:07 -03:00

26 lines
663 B
Django/Jinja

# {{ ansible_managed }}
[Unit]
Description=sahara openstack service
After=syslog.target
After=network.target
[Service]
Type=simple
User={{ system_user }}
Group={{ system_group }}
{% if program_override is defined %}
ExecStart={{ program_override }} {{ program_config_options|default('') }} --log-file=/var/log/sahara/{{ program_name }}.log
{% else %}
ExecStart={{ sahara_bin }}/{{ program_name }} {{ program_config_options|default('') }} --log-file=/var/log/sahara/{{ program_name }}.log
{% endif %}
# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300
Restart=on-failure
RestartSec=150
[Install]
WantedBy=multi-user.target