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