mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Fix a couple of linter problems, delete TODO.md (#2526)
Fix a couple of linter problems, remove trailing whitespaces Co-authored-by: Alexander Kukushkin <[email protected]>
This commit is contained in:
co-authored by
Alexander Kukushkin
parent
2ea0357854
commit
acecbe0d8f
@@ -16,18 +16,24 @@ readonly DOCKER_IP
|
||||
case "$1" in
|
||||
haproxy)
|
||||
haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -D
|
||||
CONFD="confd -prefix=$PATRONI_NAMESPACE/$PATRONI_SCOPE -interval=10 -backend"
|
||||
set -- confd "-prefix=$PATRONI_NAMESPACE/$PATRONI_SCOPE" -interval=10 -backend
|
||||
if [ -n "$PATRONI_ZOOKEEPER_HOSTS" ]; then
|
||||
while ! /usr/share/zookeeper/bin/zkCli.sh -server "$PATRONI_ZOOKEEPER_HOSTS" ls /; do
|
||||
sleep 1
|
||||
done
|
||||
exec dumb-init "$CONFD" zookeeper -node "$PATRONI_ZOOKEEPER_HOSTS"
|
||||
set -- "$@" zookeeper -node "$PATRONI_ZOOKEEPER_HOSTS"
|
||||
else
|
||||
while ! etcdctl cluster-health 2> /dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
exec dumb-init "$CONFD" etcdv3 -node "$(echo "$ETCDCTL_ENDPOINTS" | sed 's/,/ -node /g')"
|
||||
set -- "$@" etcdv3
|
||||
while IFS='' read -r line; do
|
||||
set -- "$@" -node "$line"
|
||||
done <<-EOT
|
||||
$(echo "$ETCDCTL_ENDPOINTS" | sed 's/,/\n/g')
|
||||
EOT
|
||||
fi
|
||||
exec dumb-init "$@"
|
||||
;;
|
||||
etcd)
|
||||
exec "$@" -advertise-client-urls "http://$DOCKER_IP:2379"
|
||||
|
||||
Reference in New Issue
Block a user