Lamassu update script changes (#126)

* lamassu-migrate-config script added + lamassu-default.json

* lamassu update script changes

* lamassu-update unit test added
This commit is contained in:
Fabio Cigliano 2018-06-16 22:55:42 +12:00 committed by Josh Harvey
parent 63e0782e32
commit c3535e6ed3
8 changed files with 213 additions and 36 deletions

View file

@ -16,7 +16,7 @@ SEEDS_DIR=$HOME/seeds
SEED_FILE=$SEEDS_DIR/seed.txt
BACKUP_DIR=/var/backups/postgresql
BLOCKCHAIN_DIR=/mnt/blockchains
OFAC_DATA_DIR=/var/lamassu/ofac
OFAC_DATA_DIR=/opt/lamassu-server/sanctions
# Look into http://unix.stackexchange.com/questions/140734/configure-localtime-dpkg-reconfigure-tzdata
@ -148,6 +148,7 @@ rm /tmp/Lamassu_OP.csr.pem
mkdir -p $OFAC_DATA_DIR
decho "Setting up lamassu.json..."
cat <<EOF > $CONFIG_DIR/lamassu.json
{
"postgresql": "postgres://lamassu_pg:$POSTGRES_PW@localhost/lamassu",
@ -169,6 +170,7 @@ cat <<EOF > $CONFIG_DIR/lamassu.json
}
}
EOF
lamassu-migrate-config >> $LOG_FILE 2>&1
decho "Setting up database tables..."
lamassu-migrate >> $LOG_FILE 2>&1