patroni/debian/pg_createcluster_patroni

25 lines
370 B
Plaintext
Raw Normal View History

#!/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 $?