wrapper scripts that can be used for Patroni bootstrap or standby setup. * debian/patroni.install: Install them in /usr/share/patroni.
25 lines
370 B
Bash
Executable file
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 $?
|