* debian/pg_creatconfig_patroni: Remove --scope option in favor of
pg_createcluster's regular "[options] <version> <cluster name>" syntax.
This commit is contained in:
parent
a5a0313dfd
commit
9dac6883f9
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -1,6 +1,8 @@
|
||||||
patroni (1.5.4-7) UNRELEASED; urgency=medium
|
patroni (1.5.4-7) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
*
|
[ Michael Banck ]
|
||||||
|
* debian/pg_creatconfig_patroni: Remove --scope option in favor of
|
||||||
|
pg_createcluster's regular "[options] <version> <cluster name>" syntax.
|
||||||
|
|
||||||
-- Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org> Mon, 04 Feb 2019 21:12:35 +0100
|
-- Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org> Mon, 04 Feb 2019 21:12:35 +0100
|
||||||
|
|
||||||
|
|
31
debian/pg_createconfig_patroni
vendored
31
debian/pg_createconfig_patroni
vendored
|
@ -3,10 +3,6 @@
|
||||||
for i in "$@"
|
for i in "$@"
|
||||||
do
|
do
|
||||||
case $i in
|
case $i in
|
||||||
--scope=*)
|
|
||||||
SCOPE="${i#*=}"
|
|
||||||
shift # past argument=value
|
|
||||||
;;
|
|
||||||
--hostip=*)
|
--hostip=*)
|
||||||
HOSTIP="${i#*=}"
|
HOSTIP="${i#*=}"
|
||||||
shift # past argument=value
|
shift # past argument=value
|
||||||
|
@ -29,10 +25,33 @@ case $i in
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "$SCOPE" ]; then
|
if [ -z "$2" ];
|
||||||
echo "Required option --scope missing"
|
then
|
||||||
|
echo "Usage: pg_creatconfig_patroni [options] <version> <cluster name>"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
VERSION=$1
|
||||||
|
echo $VERSION | egrep -q '^[[:digit:]]+\.?[[:digit:]]+$'
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error: invalid version ${VERSION}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [ ! -f /usr/lib/postgresql/${VERSION}/bin/initdb ]; then
|
||||||
|
echo "Error: no initdb program for version ${VERSION} found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$2" ];
|
||||||
|
then
|
||||||
|
echo "Usage: pg_creatconfig_patroni [options] <version> <cluster name>"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
CLUSTER=$2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Version: $VERSION, Cluster: $CLUSTER"
|
||||||
|
exit 0
|
||||||
|
|
||||||
if [ -z "$PORT" ]; then
|
if [ -z "$PORT" ]; then
|
||||||
# try to guess next free port
|
# try to guess next free port
|
||||||
|
|
Loading…
Reference in a new issue