Ajout : sauvegardes automatiques des bases postgresql.
[lhc/ateliers.git] / etc / sv / postgres / run
index addd8eb..bf8c49e 100755 (executable)
@@ -1,12 +1,16 @@
 #!/bin/sh -eux
 exec 2>&1
 sv=${PWD#/etc/sv/}
-install -d -m 710 -o postgres -g postgres-data \
+home="/home/postgresql"
+
+install -d -m 710 -o "$sv" -g "$sv"-data \
  /run/postgresql
-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
+ -c config_file=/etc/postgresql/9.1/main/postgresql.conf \
+ -l \
+ -p 5432