瀏覽代碼

Depend on more services, add a delay

pull/962/head
Aaron Raimist 4 年之前
父節點
當前提交
1ecee625d5
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 37419210002890EF
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. +4
    -0
      group_vars/matrix_servers
  2. +3
    -0
      roles/matrix-bot-mjolnir/templates/systemd/matrix-bot-mjolnir.service.j2

+ 4
- 0
group_vars/matrix_servers 查看文件

@@ -782,6 +782,10 @@ matrix_bot_mjolnir_systemd_required_services_list: |
['docker.service'] ['docker.service']
+ +
(['matrix-synapse.service'] if matrix_synapse_enabled else []) (['matrix-synapse.service'] if matrix_synapse_enabled else [])
+
(['matrix-postgres.service'] if matrix_postgres_enabled else [])
+
(['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
}} }}


###################################################################### ######################################################################


+ 3
- 0
roles/matrix-bot-mjolnir/templates/systemd/matrix-bot-mjolnir.service.j2 查看文件

@@ -16,6 +16,9 @@ Environment="HOME={{ matrix_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-mjolnir 2>/dev/null' ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-mjolnir 2>/dev/null'
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-mjolnir 2>/dev/null' ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-mjolnir 2>/dev/null'


# Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5

ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-mjolnir \ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-mjolnir \
--log-driver=none \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \


Loading…
取消
儲存