Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

24 righe
985 B

  1. #jinja2: lstrip_blocks: True
  2. #!/bin/bash
  3. {% if matrix_synapse_matrix_authentication_service_enabled %}
  4. echo "Registering users is handled by the Matrix Authentication Service, so you cannot use this script anymore."
  5. echo "Consider using the {{ matrix_synapse_register_user_script_matrix_authentication_service_path }} script instead."
  6. exit 2
  7. {% else %}
  8. if [ $# -ne 3 ]; then
  9. echo "Usage: "$0" <username> <password> <admin access: 0 or 1>"
  10. exit 1
  11. fi
  12. user=$1
  13. password=$2
  14. admin=$3
  15. if [ "$admin" -eq "1" ]; then
  16. {{ devture_systemd_docker_base_host_command_docker }} exec matrix-synapse register_new_matrix_user -u "$user" -p "$password" -c /data/homeserver.yaml --admin http://localhost:{{ matrix_synapse_container_client_api_port }}
  17. else
  18. {{ devture_systemd_docker_base_host_command_docker }} exec matrix-synapse register_new_matrix_user -u "$user" -p "$password" -c /data/homeserver.yaml --no-admin http://localhost:{{ matrix_synapse_container_client_api_port }}
  19. fi
  20. {% endif %}