lamassu-install and lamassu-update bugfixes (#261)
* Call bip39 after lamassu-server gets installed * Fix bash variable declaration * Remove mnemonic path from migrate defaults This caused the update-to-mnemonic script to skip thinking the mnemonic already existed
This commit is contained in:
parent
eb69b2b5c8
commit
f7e9630710
4 changed files with 8 additions and 8 deletions
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"seedPath": "/etc/lamassu/seeds/seed.txt",
|
||||
"mnemonicPath": "/etc/lamassu/mnemonics/mnemonic.txt",
|
||||
"caPath": "/etc/ssl/certs/Lamassu_OP_Root_CA.pem",
|
||||
"certPath": "/etc/ssl/certs/Lamassu_OP.pem",
|
||||
"keyPath": "/etc/ssl/private/Lamassu_OP.key",
|
||||
|
|
|
|||
|
|
@ -92,12 +92,6 @@ 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 mnemonic..."
|
||||
mkdir -p $MNEMONIC_DIR >> $LOG_FILE 2>&1
|
||||
SEED=$(openssl rand -hex 32)
|
||||
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
|
||||
NODE_MODULES=$(npm -g root)
|
||||
|
|
@ -106,6 +100,12 @@ NPM_BIN=$(npm -g bin)
|
|||
decho "Installing lamassu-server..."
|
||||
retry 3 npm -g --unsafe-perm install lamassu/lamassu-server#${1-master} >> $LOG_FILE 2>&1
|
||||
|
||||
decho "Generating mnemonic..."
|
||||
mkdir -p $MNEMONIC_DIR >> $LOG_FILE 2>&1
|
||||
SEED=$(openssl rand -hex 32)
|
||||
MNEMONIC=$(bip39 $SEED)
|
||||
echo "$MNEMONIC" > $MNEMONIC_FILE
|
||||
|
||||
decho "Creating postgres user..."
|
||||
POSTGRES_PW=$(hkdf postgres-pw $SEED)
|
||||
su -l postgres >> $LOG_FILE 2>&1 <<EOF
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@
|
|||
"lamassu-admin-server": "./bin/lamassu-admin-server",
|
||||
"lamassu-apply-defaults": "./bin/lamassu-apply-defaults",
|
||||
"hkdf": "./bin/hkdf",
|
||||
"bip39": "./bin/bip39",
|
||||
"lamassu-backup-pg": "./bin/lamassu-backup-pg",
|
||||
"lamassu-mnemonic": "./bin/lamassu-mnemonic",
|
||||
"lamassu-cancel": "./bin/lamassu-cancel",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue