Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,18 @@ for f in /docker-entrypoint-initdb.d/*; do
echo
done

# deleting areas file if present. Otherwise the link to /db/db/osm3s_vX.X.X_areas will not be created and the area is not availible.
if [ -f /dev/shm/osm3s_areas ]; then
echo "Found orphaned /dev/shm/osm3s_areas file. Deleting it."
rm /dev/shm/osm3s_areas
fi
# deleting areas file if present. Otherwise the link to /db/db/osm3s_vX.X.X_areas will not be created and the area is not available.
# Same for the main dispatcher's guard: a dispatcher that dies uncleanly
# (SIGKILL, node reboot, container-runtime restart) leaves its POSIX shm
# object behind, and on runtimes where /dev/shm persists across container
# restarts, every subsequent start fails with "File_Error File exists 17".
# At the container boundary, presence of either object means it is stale.
for name in osm3s_osm_base osm3s_areas; do
if [ -f "/dev/shm/$name" ]; then
echo "Found orphaned /dev/shm/$name file. Deleting it."
rm "/dev/shm/$name"
fi
done

if [[ ! -f /db/init_done ]]; then
echo "No database directory. Initializing"
Expand Down