Modifications : etc/postgresql/9.1 -> etc/postgresql/9.4
[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 cd /run/postgresql
9
10 exec /usr/bin/chpst \
11 -u "$sv":"$sv":"$sv"-data \
12 /usr/lib/postgresql/9.4/bin/postgres \
13 -D "$home"/data/9.4 \
14 -e \
15 -c config_file=/etc/postgresql/9.4/main/postgresql.conf \
16 -l \
17 -p 5432