3ef78ee45575676dc881059efd60cc57bd64cbd9
[arvados.git] / tools / arvbox / lib / arvbox / docker / service / postgres / run
1 #!/bin/bash
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 flock /var/lib/arvados/createusers.lock /usr/local/lib/arvbox/createusers.sh
7
8 make-ssl-cert generate-default-snakeoil --force-overwrite
9
10 . /usr/local/lib/arvbox/common.sh
11
12 chown -R $PGUSER:$PGGROUP /var/lib/postgresql
13 chown -R $PGUSER:$PGGROUP /var/run/postgresql
14 chown -R $PGUSER:$PGGROUP /etc/postgresql
15 chown -R $PGUSER:$PGGROUP /etc/ssl/private
16 chmod -R g-r /etc/ssl/private
17
18 exec chpst -u $PGUSER:$PGGROUP $0-service