* debian/pg_createcluster_patroni: Pass $DATADIR variable to pg_createcluster

if specified.
This commit is contained in:
Michael Banck 2020-05-07 12:29:43 +02:00
parent c49ecb7f92
commit ec13d27493
2 changed files with 8 additions and 1 deletions

2
debian/changelog vendored
View file

@ -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 <team+postgresql@tracker.debian.org> Mon, 27 Apr 2020 18:25:04 +0200

View file

@ -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 $?