mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-15 15:02:51 +01:00
18 lines
526 B
Plaintext
18 lines
526 B
Plaintext
|
#jinja2: lstrip_blocks: "True"
|
||
|
#!/bin/bash
|
||
|
|
||
|
if [ $# -ne 3 ]; then
|
||
|
echo "Usage: "$0" <username> <password> <admin access: 0 or 1>"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
user=$1
|
||
|
password=$2
|
||
|
admin=$3
|
||
|
|
||
|
if [ "$admin" -eq "1" ]; then
|
||
|
{{ devture_systemd_docker_base_host_command_docker }} exec matrix-authentication-service mas-cli manage register-user --yes -p "$password" --admin "$user"
|
||
|
else
|
||
|
{{ devture_systemd_docker_base_host_command_docker }} exec matrix-authentication-service mas-cli manage register-user --yes -p "$password" --no-admin "$user"
|
||
|
fi
|