Correction : vm_hosted : rule_postgresql_configure : sécurise.
[lhc/ateliers.git] / etc / sv / postgres / run
diff --git a/etc/sv/postgres/run b/etc/sv/postgres/run
new file mode 100755 (executable)
index 0000000..d8eedca
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh -eux
+exec 2>&1
+sv=${PWD#/etc/sv/}
+eval "home=~$sv"
+exec /usr/bin/chpst \
+ -u "$sv":"$sv":"$sv"-data \
+ /usr/lib/postgresql/9.1/bin/postgres \
+ -D "$home"/data \
+ -e \
+ -c config_file=/etc/postgresql/9.1/main/postgresql.conf