#!/bin/bash
set -eo pipefail

# set required environment variables
ETCD=${ETCD:-127.0.0.1:4001}
ETCD_PATH=${ETCD_PATH:-/deis/logs}

# if the keyspace already exists, exit early
etcdctl -C $ETCD ls $ETCD_PATH && exit 0

# seed etcd with default configuration
etcdctl -C $ETCD mkdir $ETCD_PATH || true

exit 0
