Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 line
423 B

  1. #jinja2: lstrip_blocks: "True"
  2. #!/bin/bash
  3. if [ $# -ne 2 ]; then
  4. echo "Usage: "$0" <username> <0/1>"
  5. echo "Usage: 0 = non-admin"
  6. echo "Usage: 1 = admin"
  7. exit 1
  8. fi
  9. docker run \
  10. -it \
  11. --rm \
  12. --user=991:991 \
  13. --cap-drop=ALL \
  14. --env-file=/matrix/postgres/env-postgres-psql \
  15. --network matrix \
  16. postgres:12.1-alpine \
  17. psql -h matrix-postgres -c "UPDATE users set admin=$2 WHERE name like '@$1:{{ matrix_domain }}'"