32 lines
796 B
Django/Jinja
32 lines
796 B
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
[Unit]
|
|
Description=Almanach api openstack service
|
|
After=syslog.target
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
EnvironmentFile=/etc/environment
|
|
User={{ system_user }}
|
|
Group={{ system_group }}
|
|
|
|
ExecStart={{ almanach_app_dir }}/bin/{{ program_name }} --config-file={{ almanach_config_file }} --log-file={{ almanach_log_file }}
|
|
|
|
# Give a reasonable amount of time for the server to start up/shut down
|
|
TimeoutSec=120
|
|
Restart=on-failure
|
|
RestartSec=2
|
|
|
|
# This creates a specific slice which all services will operate from
|
|
# The accounting options give us the ability to see resource usage through
|
|
# the `systemd-cgtop` command.
|
|
Slice=almanach.slice
|
|
CPUAccounting=true
|
|
BlockIOAccounting=true
|
|
MemoryAccounting=false
|
|
TasksAccounting=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|