patroni/debian/pg_createcluster_patroni
Michael Banck f9ee2d0854 * debian/pg_createcluster_patroni, debian/pg_clonecluster_patroni: New files,
wrapper scripts that can be used for Patroni bootstrap or standby setup.
  * debian/patroni.install: Install them in /usr/share/patroni.
2018-10-22 18:40:17 +02:00

25 lines
370 B
Bash
Executable file

#!/bin/sh
for i in "$@"
do
case $i in
--scope=*)
SCOPE="${i#*=}"
shift # past argument=value
;;
--datadir=*)
DATADIR="${i#*=}"
shift # past argument=value
;;
*)
# unknown option
;;
esac
done
VERSION=$(echo $SCOPE | sed -e 's/\/.*//')
CLUSTER=$(echo $SCOPE | sed -e 's/.*\///')
pg_createcluster $VERSION $CLUSTER
exit $?