Get install script up to date with lamassu-install
This commit is contained in:
parent
61ad8a9eba
commit
78449f19fb
1 changed files with 10 additions and 7 deletions
|
|
@ -12,8 +12,8 @@ CA_KEY_PATH=$KEY_DIR/Lamassu_OP_Root_CA.key
|
|||
CA_PATH=$CERT_DIR/Lamassu_OP_Root_CA.pem
|
||||
SERVER_KEY_PATH=$KEY_DIR/Lamassu_OP.key
|
||||
SERVER_CERT_PATH=$CERT_DIR/Lamassu_OP.pem
|
||||
SEEDS_DIR=$HOME/seeds
|
||||
SEED_FILE=$SEEDS_DIR/seed.txt
|
||||
MNEMONIC_DIR=$CONFIG_DIR/mnemonics
|
||||
MNEMONIC_FILE=$MNEMONIC_DIR/mnemonic.txt
|
||||
BACKUP_DIR=/var/backups/postgresql
|
||||
BLOCKCHAIN_DIR=/mnt/blockchains
|
||||
OFAC_DATA_DIR=/var/lamassu/ofac
|
||||
|
|
@ -67,8 +67,10 @@ fi
|
|||
release=$(lsb_release -rs)
|
||||
processor=$(uname -i)
|
||||
if [ "$release" != "16.04" ] || [ "$processor" != "x86_64" ]; then
|
||||
echo "You're attempting to install on an unsupported Linux distribution or release."
|
||||
echo "You're attempting to install on an unsupported Linux distribution or release ("$release $processor")."
|
||||
echo
|
||||
uname -a
|
||||
echo
|
||||
echo "Please return to DigitalOcean and create a droplet running Ubuntu 16.04 x64 instead."
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -90,10 +92,11 @@ apt update >> $LOG_FILE 2>&1
|
|||
decho "Installing necessary packages..."
|
||||
apt install nodejs python-minimal build-essential supervisor postgresql libpq-dev -y -q >> $LOG_FILE 2>&1
|
||||
|
||||
decho "Generating seed..."
|
||||
mkdir -p $SEEDS_DIR >> $LOG_FILE 2>&1
|
||||
decho "Generating mnemonic..."
|
||||
mkdir -p $MNEMONIC_DIR >> $LOG_FILE 2>&1
|
||||
SEED=$(openssl rand -hex 32)
|
||||
echo $SEED > $SEED_FILE
|
||||
MNEMONIC=$(bip39 $SEED)
|
||||
echo "$MNEMONIC" > $MNEMONIC_FILE
|
||||
|
||||
decho "Installing latest npm package manager for node..."
|
||||
retry 3 npm -g --unsafe-perm install npm@5 >> $LOG_FILE 2>&1
|
||||
|
|
@ -166,7 +169,7 @@ mkdir -p $OFAC_DATA_DIR
|
|||
cat <<EOF > $CONFIG_DIR/lamassu.json
|
||||
{
|
||||
"postgresql": "postgres://lamassu_pg:$POSTGRES_PW@localhost/lamassu",
|
||||
"seedPath": "$SEED_FILE",
|
||||
"mnemonicPath": "$MNEMONIC_FILE",
|
||||
"lamassuCaPath": "$LAMASSU_CA_PATH",
|
||||
"caPath": "$CA_PATH",
|
||||
"certPath": "$SERVER_CERT_PATH",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue