Check if the mempool SQL file exists before attempting to import it (#2892)

This commit is contained in:
Felipe Knorr Kuhn 2022-01-16 11:23:50 -08:00 committed by GitHub
parent 6233d13ed5
commit 2884a9ffc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,7 +130,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
sudo mariadb -e "CREATE DATABASE mempool;"
sudo mariadb -e "GRANT ALL PRIVILEGES ON mempool.* TO 'mempool' IDENTIFIED BY 'mempool';"
sudo mariadb -e "FLUSH PRIVILEGES;"
mariadb -umempool -pmempool mempool < mariadb-structure.sql
if [ -f "mariadb-structure.sql" ]; then
mariadb -umempool -pmempool mempool < mariadb-structure.sql
fi
echo "# npm install for mempool explorer (frontend)"