Modifications : etc/postgresql/9.1 -> etc/postgresql/9.4
[lhc/ateliers.git] / etc / sv / postgres / local.sh
index 9e97c8a..d8f47de 100644 (file)
@@ -1,6 +1,6 @@
 # DOC: http://wiki.postgresql.org/wiki/Shared_Database_Hosting
 
-"$tool"/local/apt-get-install postgresql-9.1
+"$tool"/local/apt-get-install postgresql-9.4
 "$tool"/local/insserv-remove  postgresql
 "$tool"/local/adduser postgres \
  --disabled-login \
@@ -23,8 +23,8 @@ sudo install -d -m 1751 -o postgres -g postgres-data \
  /home/postgresql \
  /home/postgresql/etc \
  /etc/postgresql \
- /etc/postgresql/9.1 \
- /etc/postgresql/9.1/main
+ /etc/postgresql/9.4 \
+ /etc/postgresql/9.4/main
 sudo ln -fns \
                  /etc/postgresql \
  /home/postgresql/etc/postgresql
@@ -35,39 +35,39 @@ if sudo test ! -d /home/postgresql/data
         /home/postgresql/data
        sudo -u postgres pg_createcluster \
         --datadir=/home/postgresql/data \
-        --logfile=/home/postgresql/log/9.1/main/cluster.log  \
+        --logfile=/home/postgresql/log/9.4/main/cluster.log  \
         --socketdir=/run/postgresql \
-        9.1 main
+        9.4 main
  fi
 
 sudo install -m 640 -o postgres -g postgres /dev/stdin \
- /etc/postgresql/9.1/main/pg_ctl.conf <<-EOF
+ /etc/postgresql/9.4/main/pg_ctl.conf <<-EOF
        pg_ctl_options = ''
        EOF
 sudo install -m 640 -o postgres -g postgres /dev/stdin \
- /etc/postgresql/9.1/main/start.conf <<-EOF
+ /etc/postgresql/9.4/main/start.conf <<-EOF
        EOF
 sudo install -m 640 -o postgres -g postgres \
- "$tool"/etc/postgresql/9.1/main/pg_ident.conf \
-        /etc/postgresql/9.1/main/pg_ident.conf
+ "$tool"/etc/postgresql/9.4/main/pg_ident.conf \
+        /etc/postgresql/9.4/main/pg_ident.conf
 sudo install -m 640 -o postgres -g postgres \
- "$tool"/etc/postgresql/9.1/main/pg_hba.conf \
-        /etc/postgresql/9.1/main/pg_hba.conf
+ "$tool"/etc/postgresql/9.4/main/pg_hba.conf \
+        /etc/postgresql/9.4/main/pg_hba.conf
 sudo install -m 640 -o postgres -g postgres-data \
- "$tool"/etc/postgresql/9.1/main/postgresql.conf \
-        /etc/postgresql/9.1/main/postgresql.conf
+ "$tool"/etc/postgresql/9.4/main/postgresql.conf \
+        /etc/postgresql/9.4/main/postgresql.conf
 sudo install -m 640 -o postgres -g postgres \
  "$tool"/var/pub/x509/postgresql."$local_domainname"/crt+ca.pem \
- /etc/postgresql/9.1/main/server.crt
+ /etc/postgresql/9.4/main/server.crt
 sudo install -m 640 -o postgres -g postgres \
  "$tool"/var/pub/x509/postgresql."$local_domainname"/crt.self-signed.pem \
- /etc/postgresql/9.1/main/root.crt
+ /etc/postgresql/9.4/main/root.crt
 sudo install -m 640 -o postgres -g postgres \
  "$tool"/var/pub/x509/postgresql."$local_domainname"/crl.self-signed.pem \
- /etc/postgresql/9.1/main/root.crl
+ /etc/postgresql/9.4/main/root.crl
 for f in server.crt server.key root.crt root.crl
  do sudo ln -fns \
-        /etc/postgresql/9.1/main/$f \
+        /etc/postgresql/9.4/main/$f \
         /home/postgresql/data/$f
  done