Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed data directory to just major minor version

  • Loading branch information...
commit f86bb0a04561d3aa299451f7146717f443660070 1 parent 566035b
Long Nguyen authored
5 postgresql/shell/functions
View
@@ -84,7 +84,10 @@ postgresql_defaults()
fi
config read file "defaults" key "version" prefix "package" from "postgresql"
- service_data_path="/var/db/postgresql/${package_version}/data"
+
+ major_minor_version=$(echo ${package_version} | sed 's/\.[0-9]*$//' )
+
+ service_data_path="/var/db/postgresql/${major_minor_version}/data"
[[ -n "${json_uri}" ]] || json_uri="${extension_path}/config/defaults.json"
2  postgresql/shell/initialize
View
@@ -1,7 +1,7 @@
#!/bin/sh
typeset -g json_file file service_user service_data_path master replica port \
- password user identity ssh_port ssh_identity ssh_options
+ password user identity ssh_port ssh_identity ssh_options major_minor_version
typeset -ga _initdb_flags configure_flags >/dev/null 2>&1 # Don't care if declared already.
typeset -gx PGDATA
6 postgresql/templates/postgresql.conf
View
@@ -38,11 +38,11 @@
# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.
-data_directory = '/var/db/postgresql/active/data' # use data in another directory
+data_directory = '{{service_data_path}}' # use data in another directory
# (change requires restart)
-hba_file = '/var/db/postgresql/active/data/pg_hba.conf' # host-based authentication file
+hba_file = '{{service_data_path}}/pg_hba.conf' # host-based authentication file
# (change requires restart)
-ident_file = '/var/db/postgresql/active/data/pg_ident.conf' # ident configuration file
+ident_file = '{{service_data_path}}/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
Please sign in to comment.
Something went wrong with that request. Please try again.