From ec13d274938b73d3c9ad03969d59c58571a86180 Mon Sep 17 00:00:00 2001 From: Michael Banck Date: Thu, 7 May 2020 12:29:43 +0200 Subject: [PATCH] * debian/pg_createcluster_patroni: Pass $DATADIR variable to pg_createcluster if specified. --- debian/changelog | 2 ++ debian/pg_createcluster_patroni | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f56f445..3a52df6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ patroni (1.6.5-2) UNRELEASED; urgency=medium [ Michael Banck ] * debian/pg_createconfig_patroni: Allow re-creating configuration file for already existing clusters/ports, patch by Tomas Pospisek (Closes: #953162). + * debian/pg_createcluster_patroni: Pass $DATADIR variable to pg_createcluster + if specified. -- Debian PostgreSQL Maintainers Mon, 27 Apr 2020 18:25:04 +0200 diff --git a/debian/pg_createcluster_patroni b/debian/pg_createcluster_patroni index 0e66020..b1afaa9 100755 --- a/debian/pg_createcluster_patroni +++ b/debian/pg_createcluster_patroni @@ -27,5 +27,10 @@ else CLUSTER=$(echo $SCOPE | cut -d'/' -f2- ) fi -pg_createcluster --start-conf=manual $VERSION $CLUSTER +if [ -n "$DATADIR" ] +then + pg_createcluster --start-conf=manual --datadir=$DATADIR $VERSION $CLUSTER +else + pg_createcluster --start-conf=manual $VERSION $CLUSTER +fi exit $?