14 lines
439 B
Bash
Executable File
14 lines
439 B
Bash
Executable File
#!/bin/bash
|
|
URL="https://releases.hashicorp.com/consul/0.8.3/consul_0.8.3_linux_arm.zip"
|
|
FILE="consul_0.8.3_linux_arm.zip"
|
|
UNZIP=`which unzip`
|
|
CURL=`which curl`
|
|
$CURL $URL -o $FILE
|
|
$UNZIP $FILE
|
|
mv consul /usr/bin/
|
|
rm $FILE
|
|
mkdir -p /etc/consul.d/{bootstrap,server,client}
|
|
#cp conf/bootstrap.json /etc/consul.d/bootstrap/config.json
|
|
KEY=`consul keygen`
|
|
sed -i -e 's/##key##/$KEY/g' conf/bootstrap.json > /etc/consul.d/bootstrap/config.json
|