2018-11-28 10:02:15 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ $# -ne 1 ]; then
|
2019-01-26 07:37:26 +00:00
|
|
|
echo "Usage: "$0" <username>"
|
|
|
|
exit 1
|
2018-11-28 10:02:15 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
docker run \
|
2019-01-26 07:37:26 +00:00
|
|
|
-it \
|
|
|
|
--rm \
|
2019-01-28 09:43:32 +00:00
|
|
|
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
|
|
|
--cap-drop=ALL \
|
2019-01-26 07:37:26 +00:00
|
|
|
--env-file={{ matrix_postgres_base_path }}/env-postgres-psql \
|
|
|
|
--network {{ matrix_docker_network }} \
|
|
|
|
{{ matrix_postgres_docker_image_to_use }} \
|
|
|
|
psql -h {{ matrix_postgres_connection_hostname }} -c "UPDATE users set admin=1 WHERE name like '@$1:{{ host_specific_hostname_identity }}'"
|