- Add matrix.target - Fix improper use of `docker kill`pull/986/head
| @@ -38,3 +38,9 @@ | |||||
| name: "{{ matrix_ntpd_service }}" | name: "{{ matrix_ntpd_service }}" | ||||
| state: started | state: started | ||||
| enabled: yes | enabled: yes | ||||
| - name: Ensure matrix.target is installed | |||||
| template: | |||||
| src: "{{ role_path }}/templates/systemd/matrix.target" | |||||
| dest: "{{ matrix_systemd_path }}/matrix.target" | |||||
| mode: 0644 | |||||
| @@ -0,0 +1,5 @@ | |||||
| [Unit] | |||||
| Description=Start all Matrix-related services | |||||
| [Install] | |||||
| WantedBy=multi-user.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-go-neb 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-bot-go-neb 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-go-neb 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-go-neb 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-go-neb \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-go-neb \ | ||||
| @@ -39,11 +40,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-go-neb \ | |||||
| {{ matrix_bot_go_neb_docker_image }} \ | {{ matrix_bot_go_neb_docker_image }} \ | ||||
| -c "go-neb /config/config.yaml" | -c "go-neb /config/config.yaml" | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-go-neb 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-bot-go-neb 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-go-neb 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-go-neb 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-bot-go-neb | SyslogIdentifier=matrix-bot-go-neb | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-matrix-reminder-bot 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-bot-matrix-reminder-bot 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-reminder-bot 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-reminder-bot 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-matrix-reminder-bot \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-matrix-reminder-bot \ | ||||
| @@ -32,11 +33,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-matrix-rem | |||||
| {{ matrix_bot_matrix_reminder_bot_docker_image }} \ | {{ matrix_bot_matrix_reminder_bot_docker_image }} \ | ||||
| -c "matrix-reminder-bot /config/config.yaml" | -c "matrix-reminder-bot /config/config.yaml" | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-matrix-reminder-bot 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-bot-matrix-reminder-bot 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-reminder-bot 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-reminder-bot 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-bot-matrix-reminder-bot | SyslogIdentifier=matrix-bot-matrix-reminder-bot | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | 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 }} stop 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. | # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | ||||
| @@ -32,11 +33,11 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-mjolnir \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_bot_mjolnir_docker_image }} | {{ matrix_bot_mjolnir_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-mjolnir 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-bot-mjolnir 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-mjolnir 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-mjolnir 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-bot-mjolnir | SyslogIdentifier=matrix-bot-mjolnir | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-discord 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-appservice-discord 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-discord 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-discord 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-appservice-discord \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-discord \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -35,11 +33,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-dis | |||||
| {{ matrix_appservice_discord_docker_image }} \ | {{ matrix_appservice_discord_docker_image }} \ | ||||
| node /build/src/discordas.js -p 9005 -c /cfg/config.yaml -f /cfg/registration.yaml | node /build/src/discordas.js -p 9005 -c /cfg/config.yaml -f /cfg/registration.yaml | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-discord 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-appservice-discord 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-discord 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-discord 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-appservice-discord | SyslogIdentifier=matrix-appservice-discord | ||||
| [Install] | |||||
| WantedBy=multi-user.target | |||||
| [Install] | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-irc 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-appservice-irc 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-irc 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-irc 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-appservice-irc \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-irc \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -36,11 +34,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-irc | |||||
| {{ matrix_appservice_irc_docker_image }} \ | {{ matrix_appservice_irc_docker_image }} \ | ||||
| -c 'node app.js -c /config/config.yaml -f /config/registration.yaml -p 9999' | -c 'node app.js -c /config/config.yaml -f /config/registration.yaml -p 9999' | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-irc 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-appservice-irc 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-irc 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-irc 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-appservice-irc | SyslogIdentifier=matrix-appservice-irc | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-slack 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-appservice-slack 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-slack 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-slack 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-appservice-slack \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-slack \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -35,11 +33,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-sla | |||||
| {{ matrix_appservice_slack_docker_image }} \ | {{ matrix_appservice_slack_docker_image }} \ | ||||
| node app.js -p {{matrix_appservice_slack_matrix_port}} -c /config/config.yaml -f /config/slack-registration.yaml | node app.js -p {{matrix_appservice_slack_matrix_port}} -c /config/config.yaml -f /config/slack-registration.yaml | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-slack 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-appservice-slack 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-slack 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-slack 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-appservice-slack | SyslogIdentifier=matrix-appservice-slack | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-webhooks 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-appservice-webhooks 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-webhooks 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-webhooks 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-appservice-webhooks \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-webhooks \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -35,11 +33,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-web | |||||
| {{ matrix_appservice_webhooks_docker_image }} \ | {{ matrix_appservice_webhooks_docker_image }} \ | ||||
| node index.js -p {{ matrix_appservice_webhooks_matrix_port }} -c /config/config.yaml -f /config/webhooks-registration.yaml | node index.js -p {{ matrix_appservice_webhooks_matrix_port }} -c /config/config.yaml -f /config/webhooks-registration.yaml | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-webhooks 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-appservice-webhooks 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-webhooks 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-webhooks 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-appservice-webhooks | SyslogIdentifier=matrix-appservice-webhooks | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-facebook 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-facebook 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-facebook 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-facebook 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-mautrix-facebook \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-facebook \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -32,11 +30,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-facebo | |||||
| {{ matrix_mautrix_facebook_docker_image }} \ | {{ matrix_mautrix_facebook_docker_image }} \ | ||||
| python3 -m mautrix_facebook -c /config/config.yaml --no-update | python3 -m mautrix_facebook -c /config/config.yaml --no-update | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-facebook 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-facebook 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-facebook 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-facebook 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mautrix-facebook | SyslogIdentifier=matrix-mautrix-facebook | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-hangouts matrix-mautrix-hangouts-db 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-hangouts matrix-mautrix-hangouts-db 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-hangouts matrix-mautrix-hangouts-db 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-hangouts matrix-mautrix-hangouts-db 2>/dev/null' | ||||
| ExecStartPre={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-hangouts-db \ | ExecStartPre={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-hangouts-db \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| @@ -25,9 +26,6 @@ ExecStartPre={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-han | |||||
| {{ matrix_mautrix_hangouts_docker_image }} \ | {{ matrix_mautrix_hangouts_docker_image }} \ | ||||
| alembic -x config=/config/config.yaml upgrade head | alembic -x config=/config/config.yaml upgrade head | ||||
| # 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-mautrix-hangouts \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-hangouts \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -44,11 +42,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-hangou | |||||
| {{ matrix_mautrix_hangouts_docker_image }} \ | {{ matrix_mautrix_hangouts_docker_image }} \ | ||||
| python3 -m mautrix_hangouts -c /config/config.yaml --no-update | python3 -m mautrix_hangouts -c /config/config.yaml --no-update | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-hangouts 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-hangouts 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-hangouts 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-hangouts 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mautrix-hangouts | SyslogIdentifier=matrix-mautrix-hangouts | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-instagram 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-instagram 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-instagram 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-instagram 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-mautrix-instagram \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-instagram \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -32,11 +30,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-instag | |||||
| {{ matrix_mautrix_instagram_docker_image }} \ | {{ matrix_mautrix_instagram_docker_image }} \ | ||||
| python3 -m mautrix_instagram -c /config/config.yaml --no-update | python3 -m mautrix_instagram -c /config/config.yaml --no-update | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-instagram 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-instagram 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-instagram 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-instagram 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mautrix-instagram | SyslogIdentifier=matrix-mautrix-instagram | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -10,17 +10,15 @@ After={{ service }} | |||||
| {% for service in matrix_mautrix_signal_daemon_systemd_wanted_services_list %} | {% for service in matrix_mautrix_signal_daemon_systemd_wanted_services_list %} | ||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-signal-daemon 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-signal-daemon 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal-daemon 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal-daemon 2>/dev/null' | ||||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||||
| # We can't use `--read-only` for this bridge. | # We can't use `--read-only` for this bridge. | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal-daemon \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal-daemon \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| @@ -30,7 +28,7 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal | |||||
| -v {{ matrix_mautrix_signal_daemon_path }}:/signald:z \ | -v {{ matrix_mautrix_signal_daemon_path }}:/signald:z \ | ||||
| {{ matrix_mautrix_signal_daemon_docker_image }} | {{ matrix_mautrix_signal_daemon_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-signal-daemon 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-signal-daemon 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal-daemon 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal-daemon 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| @@ -38,4 +36,5 @@ RestartSec=30 | |||||
| SyslogIdentifier=matrix-mautrix-signal-daemon | SyslogIdentifier=matrix-mautrix-signal-daemon | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -10,16 +10,14 @@ After={{ service }} | |||||
| {% for service in matrix_mautrix_signal_systemd_wanted_services_list %} | {% for service in matrix_mautrix_signal_systemd_wanted_services_list %} | ||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-signal 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-signal 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal 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-mautrix-signal \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --network={{ matrix_docker_network }} \ | --network={{ matrix_docker_network }} \ | ||||
| @@ -37,7 +35,7 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal | |||||
| {{ matrix_mautrix_signal_docker_image }} \ | {{ matrix_mautrix_signal_docker_image }} \ | ||||
| python3 -m mautrix_signal -c /config/config.yaml --no-update | python3 -m mautrix_signal -c /config/config.yaml --no-update | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-signal 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-signal 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| @@ -45,4 +43,5 @@ RestartSec=30 | |||||
| SyslogIdentifier=matrix-mautrix-signal | SyslogIdentifier=matrix-mautrix-signal | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,12 +9,15 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-telegram 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-telegram 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-telegram 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-telegram 2>/dev/null' | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-telegram-db 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-telegram-db -f 2>/dev/null' | |||||
| ExecStartPre={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-telegram-db \ | ExecStartPre={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-telegram-db \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -25,9 +28,6 @@ ExecStartPre={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-tel | |||||
| {{ matrix_mautrix_telegram_docker_image }} \ | {{ matrix_mautrix_telegram_docker_image }} \ | ||||
| alembic -x config=/config/config.yaml upgrade head | alembic -x config=/config/config.yaml upgrade head | ||||
| # 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-mautrix-telegram \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-telegram \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -44,11 +44,13 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-telegr | |||||
| {{ matrix_mautrix_telegram_docker_image }} \ | {{ matrix_mautrix_telegram_docker_image }} \ | ||||
| python3 -m mautrix_telegram -c /config/config.yaml --no-update | python3 -m mautrix_telegram -c /config/config.yaml --no-update | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-telegram 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-telegram 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-telegram 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-telegram 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mautrix-telegram | SyslogIdentifier=matrix-mautrix-telegram | ||||
| TimeoutStartSec=500s | |||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-whatsapp 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-whatsapp 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-whatsapp 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-whatsapp 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-mautrix-whatsapp \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-whatsapp \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -33,11 +31,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-whatsa | |||||
| {{ matrix_mautrix_whatsapp_docker_image }} \ | {{ matrix_mautrix_whatsapp_docker_image }} \ | ||||
| /usr/bin/mautrix-whatsapp -c /config/config.yaml -r /config/registration.yaml | /usr/bin/mautrix-whatsapp -c /config/config.yaml -r /config/registration.yaml | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-whatsapp 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mautrix-whatsapp 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-whatsapp 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-whatsapp 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mautrix-whatsapp | SyslogIdentifier=matrix-mautrix-whatsapp | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-discord 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-discord 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-discord 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-discord 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-mx-puppet-discord \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-discord \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -33,11 +31,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-disc | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_mx_puppet_discord_docker_image }} | {{ matrix_mx_puppet_discord_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-discord 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-discord 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-discord 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-discord 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mx-puppet-discord | SyslogIdentifier=matrix-mx-puppet-discord | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-groupme 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-groupme 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-groupme 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-groupme 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-mx-puppet-groupme \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-groupme \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -33,11 +31,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-grou | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_mx_puppet_groupme_docker_image }} | {{ matrix_mx_puppet_groupme_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-groupme 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-groupme 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-groupme 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-groupme 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mx-puppet-groupme | SyslogIdentifier=matrix-mx-puppet-groupme | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-instagram 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-instagram 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-instagram 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-instagram 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-mx-puppet-instagram \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-instagram \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -33,11 +31,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-inst | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_mx_puppet_instagram_docker_image }} | {{ matrix_mx_puppet_instagram_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-instagram 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-instagram 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-instagram 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-instagram 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mx-puppet-instagram | SyslogIdentifier=matrix-mx-puppet-instagram | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-skype 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-skype 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-skype 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-skype 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-mx-puppet-skype \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-skype \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -33,11 +31,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-skyp | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_mx_puppet_skype_docker_image }} | {{ matrix_mx_puppet_skype_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-skype 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-skype 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-skype 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-skype 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mx-puppet-skype | SyslogIdentifier=matrix-mx-puppet-skype | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-slack 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-slack 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-slack 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-slack 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-mx-puppet-slack \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-slack \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -36,11 +34,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-slac | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_mx_puppet_slack_docker_image }} | {{ matrix_mx_puppet_slack_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-slack 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-slack 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-slack 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-slack 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mx-puppet-slack | SyslogIdentifier=matrix-mx-puppet-slack | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-steam 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-steam 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-steam 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-steam 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-mx-puppet-steam \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-steam \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -33,11 +31,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-stea | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_mx_puppet_steam_docker_image }} | {{ matrix_mx_puppet_steam_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-steam 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-steam 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-steam 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-steam 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mx-puppet-steam | SyslogIdentifier=matrix-mx-puppet-steam | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,16 +9,14 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-twitter 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-twitter 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-twitter 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-twitter 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-mx-puppet-twitter \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-twitter \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| @@ -36,11 +34,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mx-puppet-twit | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_mx_puppet_twitter_docker_image }} | {{ matrix_mx_puppet_twitter_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mx-puppet-twitter 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mx-puppet-twitter 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-twitter 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mx-puppet-twitter 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mx-puppet-twitter | SyslogIdentifier=matrix-mx-puppet-twitter | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,17 +9,15 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-/usr/bin/docker kill matrix-sms-bridge | |||||
| ExecStartPre=-/usr/bin/docker rm matrix-sms-bridge | |||||
| ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-sms-bridge | |||||
| ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-sms-bridge | |||||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||||
| ExecStartPre=/bin/sleep 5 | |||||
| ExecStart=/usr/bin/docker run --rm --name matrix-sms-bridge \ | |||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-sms-bridge \ | |||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| --cap-drop=ALL \ | --cap-drop=ALL \ | ||||
| @@ -35,11 +33,12 @@ ExecStart=/usr/bin/docker run --rm --name matrix-sms-bridge \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_sms_bridge_docker_image }} | {{ matrix_sms_bridge_docker_image }} | ||||
| ExecStop=-/usr/bin/docker kill matrix-sms-bridge | |||||
| ExecStop=-/usr/bin/docker rm matrix-sms-bridge | |||||
| ExecStop=-{{ matrix_host_command_docker }} kill matrix-sms-bridge | |||||
| ExecStop=-{{ matrix_host_command_docker }} rm matrix-sms-bridge | |||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-sms-bridge | SyslogIdentifier=matrix-sms-bridge | ||||
| [Install] | |||||
| WantedBy=multi-user.target | |||||
| [Install] | |||||
| WantedBy=matrix.target | |||||
| @@ -6,11 +6,12 @@ Requires={{ service }} | |||||
| After={{ service }} | After={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-client-element 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-client-element 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-client-element 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-client-element 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-client-element \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-client-element \ | ||||
| @@ -35,11 +36,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-client-element | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_client_element_docker_image }} | {{ matrix_client_element_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-client-element 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-client-element 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-client-element 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-client-element 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-client-element | SyslogIdentifier=matrix-client-element | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -10,24 +10,34 @@ | |||||
| - name: Ensure Matrix services are stopped | - name: Ensure Matrix services are stopped | ||||
| service: | service: | ||||
| name: "{{ item }}" | |||||
| name: matrix.target | |||||
| state: stopped | state: stopped | ||||
| when: not ansible_check_mode | |||||
| - name: Ensure Matrix services are enabled | |||||
| service: | |||||
| name: "{{ item }}" | |||||
| enabled: true | |||||
| with_items: "{{ matrix_systemd_services_list }}" | with_items: "{{ matrix_systemd_services_list }}" | ||||
| when: not ansible_check_mode | when: not ansible_check_mode | ||||
| - name: Ensure Matrix services are started | - name: Ensure Matrix services are started | ||||
| service: | service: | ||||
| name: "{{ item }}" | |||||
| name: "matrix.target" | |||||
| enabled: "{{ matrix_services_autostart_enabled_bool }}" | enabled: "{{ matrix_services_autostart_enabled_bool }}" | ||||
| state: started | state: started | ||||
| with_items: "{{ matrix_systemd_services_list }}" | |||||
| when: not ansible_check_mode | when: not ansible_check_mode | ||||
| # If we check service state immediately, we may succeed, | |||||
| # If we check service state immediately, we may not succeed, | |||||
| # because it takes some time for the service to attempt to start and actually fail. | # because it takes some time for the service to attempt to start and actually fail. | ||||
| # | # | ||||
| # Waiting too long (30s) may not work for a similar reason, | # Waiting too long (30s) may not work for a similar reason, | ||||
| # as we may run into systemd's automatic restart logic retrying the service. | # as we may run into systemd's automatic restart logic retrying the service. | ||||
| # | |||||
| # Obviously this is a terrible way of doing things | |||||
| # Ideally, we would use Podman's PIDFiles, but then we lose support for most OSes. | |||||
| # Alternatively, we could use systemd-docker, but it hasn't been updated since 2015 and is incompatible with Podman. | |||||
| - name: Wait a bit, so that services can start (or fail) | - name: Wait a bit, so that services can start (or fail) | ||||
| wait_for: | wait_for: | ||||
| timeout: 15 | timeout: 15 | ||||
| @@ -2,6 +2,6 @@ | |||||
| - name: Ensure Matrix services stopped | - name: Ensure Matrix services stopped | ||||
| service: | service: | ||||
| name: "{{ item }}" | |||||
| name: matrix.target | |||||
| enabled: false | |||||
| state: stopped | state: stopped | ||||
| with_items: "{{ matrix_systemd_services_list }}" | |||||
| @@ -6,11 +6,12 @@ Requires={{ service }} | |||||
| After={{ service }} | After={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-corporal 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-corporal 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-corporal 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-corporal 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-corporal \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-corporal \ | ||||
| @@ -34,11 +35,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-corporal \ | |||||
| {{ matrix_corporal_docker_image }} \ | {{ matrix_corporal_docker_image }} \ | ||||
| /matrix-corporal -config=/etc/matrix-corporal/config.json | /matrix-corporal -config=/etc/matrix-corporal/config.json | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-corporal 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-corporal 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-corporal 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-corporal 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-corporal | SyslogIdentifier=matrix-corporal | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -1,6 +1,8 @@ | |||||
| [Unit] | [Unit] | ||||
| Description=Reloads matrix-coturn so that new SSL certificates can kick in | Description=Reloads matrix-coturn so that new SSL certificates can kick in | ||||
| After=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=oneshot | Type=oneshot | ||||
| ExecStart={{ matrix_host_command_systemctl }} reload matrix-coturn.service | ExecStart={{ matrix_host_command_systemctl }} reload matrix-coturn.service | ||||
| @@ -1,5 +1,6 @@ | |||||
| [Unit] | [Unit] | ||||
| Description=Reloads matrix-coturn periodically so that new SSL certificates can kick in | Description=Reloads matrix-coturn periodically so that new SSL certificates can kick in | ||||
| PartOf=matrix.target | |||||
| [Timer] | [Timer] | ||||
| Unit=matrix-coturn-reload.service | Unit=matrix-coturn-reload.service | ||||
| @@ -7,4 +8,5 @@ OnCalendar=*-*-* 06:30:00 | |||||
| RandomizedDelaySec=1h | RandomizedDelaySec=1h | ||||
| [Install] | [Install] | ||||
| WantedBy=timers.target | |||||
| WantedBy=matrix.target | |||||
| @@ -6,11 +6,12 @@ Requires={{ service }} | |||||
| After={{ service }} | After={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-coturn 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-coturn 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-coturn 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-coturn 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-coturn \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-coturn \ | ||||
| @@ -42,7 +43,7 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-coturn \ | |||||
| {{ matrix_coturn_docker_image }} \ | {{ matrix_coturn_docker_image }} \ | ||||
| -c /turnserver.conf | -c /turnserver.conf | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-coturn 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-coturn 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-coturn 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-coturn 2>/dev/null' | ||||
| # This only reloads certificates (not other configuration). | # This only reloads certificates (not other configuration). | ||||
| @@ -54,4 +55,5 @@ RestartSec=30 | |||||
| SyslogIdentifier=matrix-coturn | SyslogIdentifier=matrix-coturn | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-dimension 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-dimension 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-dimension 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-dimension 2>/dev/null' | ||||
| # Fixup database ownership if it got changed somehow (during a server migration, etc.) | # Fixup database ownership if it got changed somehow (during a server migration, etc.) | ||||
| @@ -38,11 +39,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-dimension \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_dimension_docker_image }} | {{ matrix_dimension_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-dimension 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-dimension 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-dimension 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-dimension 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-dimension | SyslogIdentifier=matrix-dimension | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-dynamic-dns 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-dynamic-dns 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-dynamic-dns 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-dynamic-dns 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-dynamic-dns \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-dynamic-dns \ | ||||
| --log-driver=none \ | --log-driver=none \ | ||||
| @@ -26,11 +27,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-dynamic-dns \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_dynamic_dns_docker_image }} | {{ matrix_dynamic_dns_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-dynamic-dns 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-dynamic-dns 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-dynamic-dns 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-dynamic-dns 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-dynamic-dns | SyslogIdentifier=matrix-dynamic-dns | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -4,11 +4,12 @@ Description=Email2Matrix | |||||
| After=docker.service | After=docker.service | ||||
| Requires=docker.service | Requires=docker.service | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-email2matrix 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-email2matrix 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-email2matrix 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-email2matrix 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-email2matrix \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-email2matrix \ | ||||
| @@ -24,11 +25,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-email2matrix \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_email2matrix_docker_image }} | {{ matrix_email2matrix_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-email2matrix 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-email2matrix 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-email2matrix 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-email2matrix 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-email2matrix | SyslogIdentifier=matrix-email2matrix | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-etherpad | |||||
| ExecStartPre=-{{ matrix_host_command_docker }} stop matrix-etherpad | |||||
| ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-etherpad | ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-etherpad | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-etherpad \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-etherpad \ | ||||
| @@ -34,11 +35,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-etherpad \ | |||||
| --sessionkey /data/sessionkey.json --apikey /data/apijey.json | --sessionkey /data/sessionkey.json --apikey /data/apijey.json | ||||
| ExecStop=-{{ matrix_host_command_docker }} kill matrix-etherpad | |||||
| ExecStop=-{{ matrix_host_command_docker }} stop matrix-etherpad | |||||
| ExecStop=-{{ matrix_host_command_docker }} rm matrix-etherpad | ExecStop=-{{ matrix_host_command_docker }} rm matrix-etherpad | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-etherpad | SyslogIdentifier=matrix-etherpad | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-grafana 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-grafana 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-grafana 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-grafana 2>/dev/null' | ||||
| @@ -33,11 +34,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-grafana \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_grafana_docker_image }} | {{ matrix_grafana_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-grafana 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-grafana 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-grafana 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-grafana 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-grafana | SyslogIdentifier=matrix-grafana | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -6,11 +6,12 @@ Requires={{ service }} | |||||
| After={{ service }} | After={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jicofo 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-jitsi-jicofo 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jicofo 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jicofo 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jicofo \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jicofo \ | ||||
| @@ -23,11 +24,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jicofo \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_jitsi_jicofo_docker_image }} | {{ matrix_jitsi_jicofo_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jicofo 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-jitsi-jicofo 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jicofo 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jicofo 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-jitsi-jicofo | SyslogIdentifier=matrix-jitsi-jicofo | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -6,11 +6,12 @@ Requires={{ service }} | |||||
| After={{ service }} | After={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jvb 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-jitsi-jvb 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jvb 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jvb 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jvb \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jvb \ | ||||
| @@ -32,11 +33,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jvb \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_jitsi_jvb_docker_image }} | {{ matrix_jitsi_jvb_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jvb 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-jitsi-jvb 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jvb 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jvb 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-jitsi-jvb | SyslogIdentifier=matrix-jitsi-jvb | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -6,11 +6,12 @@ Requires={{ service }} | |||||
| After={{ service }} | After={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-prosody 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-jitsi-prosody 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-prosody 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-prosody 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-prosody \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-prosody \ | ||||
| @@ -24,11 +25,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-prosody | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_jitsi_prosody_docker_image }} | {{ matrix_jitsi_prosody_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-prosody 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-jitsi-prosody 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-prosody 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-prosody 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-jitsi-prosody | SyslogIdentifier=matrix-jitsi-prosody | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -6,11 +6,12 @@ Requires={{ service }} | |||||
| After={{ service }} | After={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-web 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-jitsi-web 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-web 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-web 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-web \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-web \ | ||||
| @@ -27,11 +28,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-web \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_jitsi_web_docker_image }} | {{ matrix_jitsi_web_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-web 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-jitsi-web 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-web 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-web 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-jitsi-web | SyslogIdentifier=matrix-jitsi-web | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-ma1sd 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-ma1sd 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-ma1sd 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-ma1sd 2>/dev/null' | ||||
| # ma1sd writes an SQLite shared library (libsqlitejdbc.so) to /tmp and executes it from there, | # ma1sd writes an SQLite shared library (libsqlitejdbc.so) to /tmp and executes it from there, | ||||
| @@ -38,11 +39,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-ma1sd \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_ma1sd_docker_image }} | {{ matrix_ma1sd_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-ma1sd 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-ma1sd 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-ma1sd 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-ma1sd 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-ma1sd | SyslogIdentifier=matrix-ma1sd | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -4,11 +4,12 @@ Description=Matrix mailer | |||||
| After=docker.service | After=docker.service | ||||
| Requires=docker.service | Requires=docker.service | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mailer 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mailer 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mailer 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mailer 2>/dev/null' | ||||
| # --hostname gives us a friendlier hostname than the default. | # --hostname gives us a friendlier hostname than the default. | ||||
| @@ -28,11 +29,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mailer \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_mailer_docker_image }} | {{ matrix_mailer_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mailer 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-mailer 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mailer 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mailer 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-mailer | SyslogIdentifier=matrix-mailer | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -8,12 +8,14 @@ After={{ service }} | |||||
| {% for service in matrix_nginx_proxy_systemd_wanted_services_list %} | {% for service in matrix_nginx_proxy_systemd_wanted_services_list %} | ||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| After=network-online.target | |||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-nginx-proxy 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-nginx-proxy 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-nginx-proxy 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-nginx-proxy 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-nginx-proxy \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-nginx-proxy \ | ||||
| @@ -47,7 +49,7 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-nginx-proxy \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_nginx_proxy_docker_image }} | {{ matrix_nginx_proxy_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-nginx-proxy 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-nginx-proxy 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-nginx-proxy 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-nginx-proxy 2>/dev/null' | ||||
| ExecReload={{ matrix_host_command_docker }} exec matrix-nginx-proxy /usr/sbin/nginx -s reload | ExecReload={{ matrix_host_command_docker }} exec matrix-nginx-proxy /usr/sbin/nginx -s reload | ||||
| Restart=always | Restart=always | ||||
| @@ -55,4 +57,5 @@ RestartSec=30 | |||||
| SyslogIdentifier=matrix-nginx-proxy | SyslogIdentifier=matrix-nginx-proxy | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -1,5 +1,6 @@ | |||||
| [Unit] | [Unit] | ||||
| Description=Renews Let's Encrypt SSL certificates periodically | Description=Renews Let's Encrypt SSL certificates periodically | ||||
| PartOf=matrix.target | |||||
| [Timer] | [Timer] | ||||
| Unit=matrix-ssl-lets-encrypt-certificates-renew.service | Unit=matrix-ssl-lets-encrypt-certificates-renew.service | ||||
| @@ -7,4 +8,5 @@ OnCalendar=*-*-* 04:00:00 | |||||
| RandomizedDelaySec=2h | RandomizedDelaySec=2h | ||||
| [Install] | [Install] | ||||
| WantedBy=timers.target | |||||
| WantedBy=matrix.target | |||||
| @@ -1,5 +1,6 @@ | |||||
| [Unit] | [Unit] | ||||
| Description=Reloads matrix-nginx-proxy periodically so that new SSL certificates can kick in | Description=Reloads matrix-nginx-proxy periodically so that new SSL certificates can kick in | ||||
| PartOf=matrix.target | |||||
| [Timer] | [Timer] | ||||
| Unit=matrix-ssl-nginx-proxy-reload.service | Unit=matrix-ssl-nginx-proxy-reload.service | ||||
| @@ -7,4 +8,5 @@ OnCalendar=*-*-* 06:30:00 | |||||
| RandomizedDelaySec=1h | RandomizedDelaySec=1h | ||||
| [Install] | [Install] | ||||
| WantedBy=timers.target | |||||
| WantedBy=matrix.target | |||||
| @@ -4,11 +4,12 @@ Description=Matrix Postgres server | |||||
| After=docker.service | After=docker.service | ||||
| Requires=docker.service | Requires=docker.service | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-postgres 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-postgres 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-postgres 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-postgres 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-postgres \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-postgres \ | ||||
| @@ -31,11 +32,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-postgres \ | |||||
| {{ matrix_postgres_docker_image_to_use }} \ | {{ matrix_postgres_docker_image_to_use }} \ | ||||
| postgres {{ matrix_postgres_process_extra_arguments|join(' ') }} | postgres {{ matrix_postgres_process_extra_arguments|join(' ') }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-postgres 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-postgres 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-postgres 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-postgres 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-postgres | SyslogIdentifier=matrix-postgres | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-prometheus-node-exporter 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-prometheus-node-exporter 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-prometheus-node-exporter 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-prometheus-node-exporter 2>/dev/null' | ||||
| @@ -34,11 +35,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-prometheus-nod | |||||
| {{ matrix_prometheus_node_exporter_docker_image }} \ | {{ matrix_prometheus_node_exporter_docker_image }} \ | ||||
| --path.rootfs=/host | --path.rootfs=/host | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-prometheus-node-exporter 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-prometheus-node-exporter 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-prometheus-node-exporter 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-prometheus-node-exporter 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-prometheus-node-exporter | SyslogIdentifier=matrix-prometheus-node-exporter | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-prometheus 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-prometheus 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-prometheus 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-prometheus 2>/dev/null' | ||||
| @@ -33,11 +34,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-prometheus \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_prometheus_docker_image }} | {{ matrix_prometheus_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-prometheus 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-prometheus 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-prometheus 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-prometheus 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-prometheus | SyslogIdentifier=matrix-prometheus | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -3,13 +3,14 @@ | |||||
| Description=Matrix Redis server | Description=Matrix Redis server | ||||
| After=docker.service | After=docker.service | ||||
| Requires=docker.service | Requires=docker.service | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| ExecStartPre=-/usr/bin/docker stop matrix-redis | |||||
| ExecStartPre=-/usr/bin/docker rm matrix-redis | |||||
| ExecStartPre=-{{ matrix_host_command_docker }} stop matrix-redis | |||||
| ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-redis | |||||
| ExecStart=/usr/bin/docker run --rm --name matrix-redis \ | |||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-redis \ | |||||
| --log-driver=none \ | --log-driver=none \ | ||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| --cap-drop=ALL \ | --cap-drop=ALL \ | ||||
| @@ -26,11 +27,12 @@ ExecStart=/usr/bin/docker run --rm --name matrix-redis \ | |||||
| {{ matrix_redis_docker_image_to_use }} \ | {{ matrix_redis_docker_image_to_use }} \ | ||||
| redis-server /usr/local/etc/redis/redis.conf | redis-server /usr/local/etc/redis/redis.conf | ||||
| ExecStop=-/usr/bin/docker stop matrix-redis | |||||
| ExecStop=-/usr/bin/docker rm matrix-redis | |||||
| ExecStop=-{{ matrix_host_command_docker }} stop matrix-redis | |||||
| ExecStop=-{{ matrix_host_command_docker }} rm matrix-redis | |||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-redis | SyslogIdentifier=matrix-redis | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-registration 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-registration 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-registration 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-registration 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-registration \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-registration \ | ||||
| @@ -32,11 +33,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-registration \ | |||||
| {{ matrix_registration_docker_image }} \ | {{ matrix_registration_docker_image }} \ | ||||
| serve | serve | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-registration 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-registration 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-registration 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-registration 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-registration | SyslogIdentifier=matrix-registration | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-sygnal 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-sygnal 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-sygnal 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-sygnal 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-sygnal \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-sygnal \ | ||||
| @@ -32,11 +33,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-sygnal \ | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_sygnal_docker_image }} | {{ matrix_sygnal_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-sygnal 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-sygnal 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-sygnal 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-sygnal 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-sygnal | SyslogIdentifier=matrix-sygnal | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -9,11 +9,12 @@ After={{ service }} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-synapse-admin 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-synapse-admin 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-synapse-admin 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-synapse-admin 2>/dev/null' | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-synapse-admin \ | ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-synapse-admin \ | ||||
| @@ -32,11 +33,12 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-synapse-admin | |||||
| {% endfor %} | {% endfor %} | ||||
| {{ matrix_synapse_admin_docker_image }} | {{ matrix_synapse_admin_docker_image }} | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-synapse-admin 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-synapse-admin 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-synapse-admin 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-synapse-admin 2>/dev/null' | ||||
| Restart=always | Restart=always | ||||
| RestartSec=30 | RestartSec=30 | ||||
| SyslogIdentifier=matrix-synapse-admin | SyslogIdentifier=matrix-synapse-admin | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -4,11 +4,12 @@ Description=Matrix Goofys media store | |||||
| After=docker.service | After=docker.service | ||||
| Requires=docker.service | Requires=docker.service | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_docker }} kill %n | |||||
| ExecStartPre=-{{ matrix_host_command_docker }} stop %n | |||||
| ExecStartPre=-{{ matrix_host_command_docker }} rm %n | ExecStartPre=-{{ matrix_host_command_docker }} rm %n | ||||
| ExecStart={{ matrix_host_command_docker }} run --rm --name %n \ | ExecStart={{ matrix_host_command_docker }} run --rm --name %n \ | ||||
| @@ -28,7 +29,7 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name %n \ | |||||
| TimeoutStartSec=5min | TimeoutStartSec=5min | ||||
| ExecStop=-{{ matrix_host_command_docker }} stop %n | ExecStop=-{{ matrix_host_command_docker }} stop %n | ||||
| ExecStop=-{{ matrix_host_command_docker }} kill %n | |||||
| ExecStop=-{{ matrix_host_command_docker }} stop %n | |||||
| ExecStop=-{{ matrix_host_command_docker }} rm %n | ExecStop=-{{ matrix_host_command_docker }} rm %n | ||||
| ExecStop=-{{ matrix_host_command_fusermount }} -u {{ matrix_s3_media_store_path }} | ExecStop=-{{ matrix_host_command_fusermount }} -u {{ matrix_s3_media_store_path }} | ||||
| Restart=always | Restart=always | ||||
| @@ -36,4 +37,5 @@ RestartSec=5 | |||||
| SyslogIdentifier=matrix-goofys | SyslogIdentifier=matrix-goofys | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -3,12 +3,13 @@ | |||||
| Description=Synapse worker ({{ matrix_synapse_worker_container_name }}) | Description=Synapse worker ({{ matrix_synapse_worker_container_name }}) | ||||
| AssertPathExists={{ matrix_synapse_config_dir_path }}/{{ matrix_synapse_worker_config_file_name }} | AssertPathExists={{ matrix_synapse_config_dir_path }}/{{ matrix_synapse_worker_config_file_name }} | ||||
| After=matrix-synapse.service | After=matrix-synapse.service | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_docker }} kill {{ matrix_synapse_worker_container_name }} | |||||
| ExecStartPre=-{{ matrix_host_command_docker }} stop {{ matrix_synapse_worker_container_name }} | |||||
| ExecStartPre=-{{ matrix_host_command_docker }} rm {{ matrix_synapse_worker_container_name }} | ExecStartPre=-{{ matrix_host_command_docker }} rm {{ matrix_synapse_worker_container_name }} | ||||
| # Intentional delay, so that the homeserver can manage to start. | # Intentional delay, so that the homeserver can manage to start. | ||||
| @@ -48,7 +49,7 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name {{ matrix_synapse_wor | |||||
| run -m synapse.app.{{ matrix_synapse_worker_details.type }} -c /data/homeserver.yaml -c /data/{{ matrix_synapse_worker_config_file_name }} | run -m synapse.app.{{ matrix_synapse_worker_details.type }} -c /data/homeserver.yaml -c /data/{{ matrix_synapse_worker_config_file_name }} | ||||
| ExecStop=-{{ matrix_host_command_docker }} kill {{ matrix_synapse_worker_container_name }} | |||||
| ExecStop=-{{ matrix_host_command_docker }} stop {{ matrix_synapse_worker_container_name }} | |||||
| ExecStop=-{{ matrix_host_command_docker }} rm {{ matrix_synapse_worker_container_name }} | ExecStop=-{{ matrix_host_command_docker }} rm {{ matrix_synapse_worker_container_name }} | ||||
| ExecReload={{ matrix_host_command_docker }} exec {{ matrix_synapse_worker_container_name }} /bin/sh -c 'kill -HUP 1' | ExecReload={{ matrix_host_command_docker }} exec {{ matrix_synapse_worker_container_name }} /bin/sh -c 'kill -HUP 1' | ||||
| @@ -60,5 +61,7 @@ SyslogIdentifier={{ matrix_synapse_worker_container_name }} | |||||
| # as matrix.synapse.service already has `Wants=` lines. | # as matrix.synapse.service already has `Wants=` lines. | ||||
| # Also, WantedBy will trigger the creation of some `matrix-synapse.service.wants/` directory, | # Also, WantedBy will trigger the creation of some `matrix-synapse.service.wants/` directory, | ||||
| # which we'd have to clean, etc. Better not. | # which we'd have to clean, etc. Better not. | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||
| @@ -15,13 +15,13 @@ Wants={{ service }} | |||||
| Wants=matrix-synapse-worker-{{ matrix_synapse_worker_details.type }}-{{ matrix_synapse_worker_details.port }}.service | Wants=matrix-synapse-worker-{{ matrix_synapse_worker_details.type }}-{{ matrix_synapse_worker_details.port }}.service | ||||
| {% endfor %} | {% endfor %} | ||||
| {% endif %} | {% endif %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||
| PartOf=matrix.target | |||||
| [Service] | [Service] | ||||
| Type=simple | Type=simple | ||||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | Environment="HOME={{ matrix_systemd_unit_home_path }}" | ||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-synapse 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-synapse 2>/dev/null' | |||||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-synapse 2>/dev/null' | ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-synapse 2>/dev/null' | ||||
| {% if matrix_s3_media_store_enabled %} | {% if matrix_s3_media_store_enabled %} | ||||
| # Allow for some time before starting, so that media store can mount. | # Allow for some time before starting, so that media store can mount. | ||||
| @@ -65,7 +65,7 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-synapse \ | |||||
| {{ matrix_synapse_docker_image }} \ | {{ matrix_synapse_docker_image }} \ | ||||
| run -m synapse.app.homeserver -c /data/homeserver.yaml | run -m synapse.app.homeserver -c /data/homeserver.yaml | ||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-synapse 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-synapse 2>/dev/null' | |||||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-synapse 2>/dev/null' | ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-synapse 2>/dev/null' | ||||
| ExecReload={{ matrix_host_command_docker }} exec matrix-synapse /bin/sh -c 'kill -HUP 1' | ExecReload={{ matrix_host_command_docker }} exec matrix-synapse /bin/sh -c 'kill -HUP 1' | ||||
| Restart=always | Restart=always | ||||
| @@ -73,4 +73,5 @@ RestartSec=30 | |||||
| SyslogIdentifier=matrix-synapse | SyslogIdentifier=matrix-synapse | ||||
| [Install] | [Install] | ||||
| WantedBy=multi-user.target | |||||
| WantedBy=matrix.target | |||||