2021-01-24 07:41:11 +01:00
|
|
|
#jinja2: lstrip_blocks: "True"
|
|
|
|
#!/bin/bash
|
|
|
|
|
2022-09-02 03:23:02 +02:00
|
|
|
if [ $# -ne 3 ]; then
|
2022-08-24 05:59:08 +02:00
|
|
|
echo "Usage: "$0" <username> <password> <admin access: 0 or 1>"
|
2021-01-24 07:41:11 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
user=$1
|
|
|
|
password=$2
|
2022-08-23 18:12:09 +02:00
|
|
|
admin=$3
|
2021-01-24 07:41:11 +01:00
|
|
|
|
2022-08-23 18:12:09 +02:00
|
|
|
if [ "$admin" -eq "1" ]; then
|
2024-10-18 20:14:04 +02:00
|
|
|
{{ devture_systemd_docker_base_host_command_docker }} exec matrix-dendrite create-account -config /data/dendrite.yaml -username "$user" -password "$password" -admin -url http://localhost:{{ matrix_dendrite_http_bind_port }}
|
2022-08-23 18:12:09 +02:00
|
|
|
else
|
2024-10-18 20:14:04 +02:00
|
|
|
{{ devture_systemd_docker_base_host_command_docker }} exec matrix-dendrite create-account -config /data/dendrite.yaml -username "$user" -password "$password" -url http://localhost:{{ matrix_dendrite_http_bind_port }}
|
2022-08-23 18:12:09 +02:00
|
|
|
fi
|