Fixed error in create-user

This commit is contained in:
Roger Gonzalez 2024-12-15 13:17:09 -03:00
parent 221239fc17
commit 4bab6088f2
Signed by: rogs
GPG Key ID: C7ECE9C6C36EC2E6

View File

@ -20,18 +20,14 @@ while true; do
done done
echo "Creating user: $USERNAME" echo "Creating user: $USERNAME"
OUTPUT=$(docker compose exec -T monolith /usr/bin/create-account \ docker compose exec monolith /usr/bin/create-account \
-config /etc/dendrite/dendrite.yaml \ -config /etc/dendrite/dendrite.yaml \
-username "$USERNAME" \ -username "$USERNAME" \
$ADMIN_FLAG) $ADMIN_FLAG
# Check if the command was successful # Check if the command was successful
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "User \"$USERNAME\" created successfully!" echo "User \"$USERNAME\" created successfully!"
echo
echo "Access Token (save this for double puppeting):"
echo "$OUTPUT" | grep -o "Access token: .*" | cut -d' ' -f3-
echo
echo "Make sure to save this access token! You'll need it to enable double puppeting in the bridges." echo "Make sure to save this access token! You'll need it to enable double puppeting in the bridges."
else else
echo "Error: Failed to create user" echo "Error: Failed to create user"