Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 rivejä
1.4 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. [Unit]
  3. Description=Matrix Dynamic DNS
  4. {% for service in matrix_dynamic_dns_systemd_required_services_list %}
  5. Requires={{ service }}
  6. After={{ service }}
  7. {% endfor %}
  8. {% for service in matrix_dynamic_dns_systemd_wanted_services_list %}
  9. Wants={{ service }}
  10. {% endfor %}
  11. DefaultDependencies=no
  12. PartOf=matrix.target
  13. [Service]
  14. Type=simple
  15. Environment="HOME={{ matrix_systemd_unit_home_path }}"
  16. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-dynamic-dns 2>/dev/null'
  17. ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-dynamic-dns 2>/dev/null'
  18. ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-dynamic-dns \
  19. --log-driver=none \
  20. --network={{ matrix_docker_network }} \
  21. -e PUID={{ matrix_user_uid }} \
  22. -e PGID={{ matrix_user_gid }} \
  23. -v {{ matrix_dynamic_dns_config_path }}:/config:z \
  24. {% for arg in matrix_dynamic_dns_container_extra_arguments %}
  25. {{ arg }} \
  26. {% endfor %}
  27. {{ matrix_dynamic_dns_docker_image }}
  28. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} stop matrix-dynamic-dns 2>/dev/null'
  29. ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-dynamic-dns 2>/dev/null'
  30. Restart=always
  31. RestartSec=30
  32. SyslogIdentifier=matrix-dynamic-dns
  33. [Install]
  34. WantedBy=matrix.target