lab-ansible/roles/apps/files/jitsi/register.sh

17 lines
390 B
Bash
Raw Normal View History

2024-02-10 21:36:48 +00:00
# THIS FILE IS MANAGED BY ANSIBLE
#!/usr/bin/env bash
cd "$(dirname "$0")"
USERNAME=$1
read -rsp "password: " PASSWORD; echo
if [[ -f "data/prosody/config/data/meet%2ejitsi/accounts/$USERNAME.dat" ]]; then
echo "User $USERNAME exists"
exit 1
fi
docker compose exec prosody \
/usr/bin/prosodyctl --config /config/prosody.cfg.lua \
register $USERNAME meet.jitsi $PASSWORD