Преглед изворни кода

Make post-start delay for matrix-dendrite configurable

pull/3115/head
Slavi Pantaleev пре 2 година
родитељ
комит
4407403ab7
2 измењених фајлова са 12 додато и 3 уклоњено
  1. +9
    -0
      roles/custom/matrix-dendrite/defaults/main.yml
  2. +3
    -3
      roles/custom/matrix-dendrite/templates/systemd/matrix-dendrite.service.j2

+ 9
- 0
roles/custom/matrix-dendrite/defaults/main.yml Прегледај датотеку

@@ -186,6 +186,15 @@ matrix_dendrite_systemd_wanted_services_list_default: ["docker.service"]
matrix_dendrite_systemd_wanted_services_list_auto: [] matrix_dendrite_systemd_wanted_services_list_auto: []
matrix_dendrite_systemd_wanted_services_list_custom: [] matrix_dendrite_systemd_wanted_services_list_custom: []


# Controls how long to sleep for after starting the matrix-dendrite container.
#
# Delaying, so that the homeserver can manage to fully start and various services
# that depend on it (`matrix_dendrite_systemd_required_services_list` and `matrix_dendrite_systemd_wanted_services_list`)
# may only start after the homeserver is up and running.
#
# This can be set to 0 to remove the delay.
matrix_dendrite_systemd_service_post_start_delay_seconds: 3

# Specifies which template files to use when configuring Dendrite. # Specifies which template files to use when configuring Dendrite.
# If you'd like to have your own different configuration, feel free to copy and paste # If you'd like to have your own different configuration, feel free to copy and paste
# the original files into your inventory (e.g. in `inventory/host_vars/<host>/`) # the original files into your inventory (e.g. in `inventory/host_vars/<host>/`)


+ 3
- 3
roles/custom/matrix-dendrite/templates/systemd/matrix-dendrite.service.j2 Прегледај датотеку

@@ -63,9 +63,9 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network conne


ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-dendrite ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-dendrite


# Intentional delay, so that the homeserver can manage to start and various services
# that depend on it (After/Requires) may only start after the homeserver is up and running.
ExecStartPost=-{{ matrix_host_command_sleep }} 3
{% if matrix_dendrite_systemd_service_post_start_delay_seconds != 0 %}
ExecStartPost=-{{ matrix_host_command_sleep }} {{ matrix_dendrite_systemd_service_post_start_delay_seconds }}
{% endif %}


ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-dendrite 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-dendrite 2>/dev/null || true'
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-dendrite 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-dendrite 2>/dev/null || true'


Loading…
Откажи
Сачувај