matrix-docker-ansible-deploy/roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2

40 lines
1.5 KiB
Plaintext
Raw Normal View History

2021-06-21 18:48:29 +00:00
#jinja2: lstrip_blocks: "True"
[Unit]
2021-06-22 05:41:01 +00:00
Description=Matrix jitsi-jibri server
{% for service in matrix_jitsi_jibri_systemd_required_services_list %}
2021-06-21 18:48:29 +00:00
Requires={{ service }}
After={{ service }}
{% endfor %}
DefaultDependencies=no
[Service]
Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}"
2021-06-22 05:41:01 +00:00
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jibri 2>/dev/null'
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jibri 2>/dev/null'
2021-06-21 18:48:29 +00:00
2021-06-22 05:41:01 +00:00
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jibri \
2021-06-21 18:48:29 +00:00
--log-driver=none \
--network={{ matrix_docker_network }} \
2021-06-22 05:41:01 +00:00
--env-file={{ matrix_jitsi_jibri_base_path }}/env \
# --device=/dev/snd:/dev/snd \
--mount type=bind,src=/dev/snd,dst=/dev/snd \
--mount type=bind,src={{ matrix_jitsi_jibri_config_path }},dst=/config \
# --volume={{ matrix_jitsi_jibri_config_path }}:/config:Z \
--volume=/dev/shm:/dev/shm \
--cap-add=SYS_ADMIN \
--cap-add=NET_BIND_SERVICE \
{% for arg in matrix_jitsi_jibri_container_extra_arguments %}
2021-06-21 18:48:29 +00:00
{{ arg }} \
{% endfor %}
2021-06-22 05:41:01 +00:00
{{ matrix_jitsi_jibri_docker_image }}
2021-06-21 18:48:29 +00:00
2021-06-22 05:41:01 +00:00
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jibri 2>/dev/null'
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jibri 2>/dev/null'
2021-06-21 18:48:29 +00:00
Restart=always
RestartSec=30
2021-06-22 05:41:01 +00:00
SyslogIdentifier=matrix-jitsi-jibri
2021-06-21 18:48:29 +00:00
[Install]
WantedBy=multi-user.target