From 2884a9ffc6dcafeae61a521dc4dd3756828cd81a Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com> Date: Sun, 16 Jan 2022 11:23:50 -0800 Subject: [PATCH] Check if the mempool SQL file exists before attempting to import it (#2892) --- home.admin/config.scripts/bonus.mempool.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/home.admin/config.scripts/bonus.mempool.sh b/home.admin/config.scripts/bonus.mempool.sh index a080b59b3..16f63d5f4 100755 --- a/home.admin/config.scripts/bonus.mempool.sh +++ b/home.admin/config.scripts/bonus.mempool.sh @@ -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)"