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