13 lines
378 B
Bash
Executable File
13 lines
378 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
vault write /database/roles/matrix-synapse \
|
|
db_name="postgres" \
|
|
creation_statements="CREATE ROLE \"{{name}}\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}'; \
|
|
GRANT \"matrix-synapse\" TO \"{{name}}\"; \
|
|
ALTER ROLE \"{{name}}\" SET role = \"matrix-synapse\"" \
|
|
default_ttl="12h" \
|
|
max_ttl="720h"
|
|
|