2019-05-07 21:23:35 +02:00
|
|
|
#jinja2: lstrip_blocks: "True"
|
2017-07-31 22:07:30 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-08-01 10:11:29 +02:00
|
|
|
if [ $# -ne 3 ]; then
|
2019-01-26 08:37:26 +01:00
|
|
|
echo "Usage: "$0" <username> <password> <admin access: 0 or 1>"
|
|
|
|
exit 1
|
2017-07-31 22:07:30 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
user=$1
|
|
|
|
password=$2
|
2017-08-01 10:11:29 +02:00
|
|
|
admin=$3
|
2017-07-31 22:07:30 +02:00
|
|
|
|
2017-08-01 10:11:29 +02:00
|
|
|
if [ "$admin" -eq "1" ]; then
|
2024-10-18 20:14:04 +02:00
|
|
|
{{ 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 }}
|
2017-08-11 07:21:34 +02:00
|
|
|
else
|
2024-10-18 20:14:04 +02:00
|
|
|
{{ 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 }}
|
2019-01-26 08:37:26 +01:00
|
|
|
fi
|