a65e1c0fbdc8a23e9cfef287784bb15ad5059534
[lhc/ateliers.git] / etc / sv / postgres / run
1 #!/bin/sh -eux
2 exec 2>&1
3 sv=${PWD#/etc/sv/}
4 home="/home/postgresql"
5
6 install -d -m 710 -o "$sv" -g "$sv"-data \
7 /run/postgresql
8
9 exec /usr/bin/chpst \
10 -u "$sv":"$sv":"$sv"-data \
11 /usr/lib/postgresql/9.1/bin/postgres \
12 -D "$home"/data \
13 -e \
14 -c config_file=/etc/postgresql/9.1/main/postgresql.conf