OSMFILE=$1
PGDIR=$2
THREADS=$3

sleep 5

until [ -e /app/src/data-sources/osmfile/osm_ready ]; do
  echo "::: Waiting for OSM file to be ready... :::"
  sleep 5
done

rm /app/src/data-sources/osmfile/osm_ready

sudo sh ./init.sh $OSMFILE $PGDIR $THREADS

sudo sh ./start.sh
