etcd/etcd-env.sh
yuqi-zhang 13e76aa752 Update master branch to upstream
Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
2017-09-06 15:08:03 -04:00

15 lines
317 B
Bash
Executable file

#!/bin/sh
ipaddress=$(hostname -I | cut -f1 -d' ')
if test x$NAME == x; then
NAME=$HOSTNAME
fi
export ETCD_NAME=${ETCD_NAME:-$HOSTNAME}
export ETCD_DATA_DIR=/var/lib/etcd/${NAME}.etcd
if test -e /etc/etcd/etcd.conf; then
source /etc/etcd/etcd.conf
fi
# Execute the commands passed to this script
exec "$@"