diff --git a/mon/make-units.sh b/mon/make-units.sh index cbbc0ba8..f68322ee 100644 --- a/mon/make-units.sh +++ b/mon/make-units.sh @@ -8,6 +8,43 @@ IP=`ip -json a s | jq -r '.[].addr_info[] | select(.broadcast == "10.115.0.255") [ "$IP" != "" ] || exit 1 +BASE=${IP/*./} +BASE=$((BASE-10)) + +useradd etcd + +mkdir -p /var/lib/etcd$BASE.etcd +cat >/etc/systemd/system/etcd.service <