Files
mtusi2026lab7/infra/db-grants.sh
T
Khakimov Dmitrij 2a7418fc45
Skeleton contracts / contracts (pull_request) Blocked by required conditions
lab 7 done
2026-11-29 21:59:16 +03:00

8 lines
261 B
Bash

#!/bin/sh
set -eu
export PGPASSWORD="$(cat /bootstrap/admin/POSTGRES_PASSWORD)"
if [ "${1:-}" = worker ]; then
exec psql -X -q -h postgres -U messenger -d messenger -f /rotate-worker.sql
fi
exec psql -X -q -h postgres -U messenger -d messenger -f /grants.sql