diff --git a/bin/install.sh b/bin/install.sh index 30b8a200..9700d421 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -10,13 +10,13 @@ mkdir -p "./storage/database" # Generate the sqlite database for the index backend if it does not exist if ! [ -f "./storage/database/data.db" ]; then - # todo: it should get the path from config.toml and only do it when we use sqlite - touch ./storage/database/data.db - echo ";" | sqlite3 ./storage/database/data.db + sqlite3 ./storage/database/data.db "VACUUM;" fi +# Generate storage directory if it does not exist +mkdir -p "./storage/tracker/lib/database" + # Generate the sqlite database for the tracker if it does not exist -if ! [ -f "./storage/database/tracker.db" ]; then - touch ./storage/database/tracker.db - echo ";" | sqlite3 ./storage/database/tracker.db +if ! [ -f "./storage/tracker/lib/database/sqlite3.db" ]; then + sqlite3 ./storage/tracker/lib/database/sqlite3.db "VACUUM;" fi diff --git a/docker/bin/e2e/sqlite/e2e-env-reset.sh b/docker/bin/e2e/sqlite/e2e-env-reset.sh index b3ff33da..e6d995a3 100755 --- a/docker/bin/e2e/sqlite/e2e-env-reset.sh +++ b/docker/bin/e2e/sqlite/e2e-env-reset.sh @@ -12,7 +12,6 @@ mkdir -p "./storage/database" # Generate the sqlite database for the index backend if it does not exist if ! [ -f "./storage/database/torrust_index_backend_e2e_testing.db" ]; then - # todo: it should get the path from config.toml and only do it when we use sqlite sqlite3 ./storage/database/torrust_index_backend_e2e_testing.db "VACUUM;" fi