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
|
2019-10-14 09:59:56 +02:00
|
|
|
docker exec matrix-synapse register_new_matrix_user -u "$user" -p "$password" -c /data/homeserver.yaml --admin http://localhost:8008
|
2017-08-11 07:21:34 +02:00
|
|
|
else
|
2019-10-14 09:59:56 +02:00
|
|
|
docker exec matrix-synapse register_new_matrix_user -u "$user" -p "$password" -c /data/homeserver.yaml --no-admin http://localhost:8008
|
2019-01-26 08:37:26 +01:00
|
|
|
fi
|