Skip to content

Commit

Permalink
fix initdb script
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhan-yilmaz committed Oct 18, 2024
1 parent 0827bf4 commit 6f68ce6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion steampipe/init-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if ls "$SQL_DIR"/*.sql 1> /dev/null 2>&1; then
echo "[init-db.sh] Starting DB Initialization as there are .sql scripts in ~/initdb-sql-scripts directory"

while true; do # Loop until the exit code of healthcheck.sh is 0
bash healthcheck.sh > /dev/null
bash healthcheck.sh
exit_code=$?

if [ $exit_code -eq 0 ]; then # Check if the exit code is 0
Expand All @@ -18,6 +18,8 @@ if ls "$SQL_DIR"/*.sql 1> /dev/null 2>&1; then
fi
done

sleep 5

echo "[init-db.sh] Running SQL scripts:"
for sql_file in "$SQL_DIR"/*.sql; do
if [ -e "$sql_file" ]; then # Check if there are any .sql files
Expand Down

0 comments on commit 6f68ce6

Please sign in to comment.