#!/bin/bash # example: ./etcd.sh etcd01 192.168.80.10 etcd02=https://192.168.80.11:2380,etcd03=https://192.168.80.12:2380 #创建etcd配置文件/opt/etcd/cfg/etcd ETCD_NAME=$1 ETCD_IP=$2 ETCD_CLUSTER=$3 WORK_DIR=/opt/etcd cat > $WORK_DIR/cfg/etcd < /usr/lib/systemd/system/etcd.service <