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