Skip to content

Instantly share code, notes, and snippets.

@chrishoerl
Created April 8, 2020 22:12
Show Gist options
  • Save chrishoerl/d5e54f9e0dfed3524743ae015b211b09 to your computer and use it in GitHub Desktop.
Save chrishoerl/d5e54f9e0dfed3524743ae015b211b09 to your computer and use it in GitHub Desktop.
Create simple user accounts for Jitsi video server
#!/bin/bash
# initially create users
#
# they can log in with Username: user[1,5] and Password: user[1,5]
# example: user1 / user1
#
###########
#
# Requirements: the .env file must contain these settings:
# ENABLE_AUTH=1
# AUTH_TYPE=internal
#
###########
# define usernames you want to grant access
user_array=(user1 user2 user3 user4 user5)
# init counter
COUNTER=1
# Count how many pipelines we found out
NUMOFUSERS=`echo ${#user_array[@]}`
# Print statistics
echo -e "---\nCreating $NUMOFUSERS users:"
# Create users
for username in "${user_array[@]}"
do
echo "Task: $COUNTER Creating user: ${username} ..."
docker-compose exec prosody /bin/bash -c "prosodyctl --config /config/prosody.cfg.lua register $username meet.jitsi $username"
echo "done"
sleep 3
# Raise counter
COUNTER=$((COUNTER + 1))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment