Skip to content

Commit

Permalink
Add Wait for restore to complete
Browse files Browse the repository at this point in the history
  • Loading branch information
seoseonyu committed Feb 1, 2024
1 parent a3e4a48 commit 5fbcc00
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,11 @@ if [ "${#backup_pids[@]}" -ne 0 ]; then
tail --pid="$pid" -f 2>/dev/null
done
fi

mapfile -t restore_pids < <(pgrep restore)
if [ "${#restore_pids[@]}" -ne 0 ]; then
echo "Waiting for restore to finish"
for pid in "${restore_pids[@]}"; do
tail --pid="$pid" -f 2>/dev/null
done
fi

0 comments on commit 5fbcc00

Please sign in to comment.