etcd/etcd-env.sh
yuqi-zhang c4a384c876 Update f26 to upstream
Signed-off-by: Yu Qi Zhang <jzehrarnyg@gmail.com>
2017-09-06 15:13:58 -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 "$@"