Browse Source

Added ability to run poi generation only

Added ability to inject google map api key
Spencer Gardner 7 years ago
parent
commit
8f65270ab2
1 changed files with 8 additions and 5 deletions
  1. 8 5
      entrypoint.sh

+ 8 - 5
entrypoint.sh

@@ -11,10 +11,13 @@ fi
 wget -N https://s3.amazonaws.com/Minecraft.Download/versions/${MINECRAFT_VERSION}/${MINECRAFT_VERSION}.jar -P /home/minecraft/.minecraft/versions/${MINECRAFT_VERSION}/
 
 # Run the world renders (One pass to make map, one to generate points of interests)
-overviewer.py --config /home/minecraft/config.py
-overviewer.py --config /home/minecraft/config.py --genpoi
 
-# Add Google Maps API key if the GOOGLE_MAPS_API_KEY environment variable is set
-if [ "$GOOGLE_MAPS_API_KEY" ]; then
-  sed -i "s|https://maps.google.com/maps/api/js|&?key=${GOOGLE_MAPS_API_KEY}|g" /home/minecraft/render/index.html
+if [ "$POI_ONLY" != "y" ]; then
+  overviewer.py --config /home/minecraft/config.py
+  # Add Google Maps API key if the GOOGLE_MAPS_API_KEY environment variable is set
+  if [ "$GOOGLE_MAPS_API_KEY" ]; then
+    sed -i "s|https://maps.google.com/maps/api/js|&?key=${GOOGLE_MAPS_API_KEY}|g" /home/minecraft/render/index.html
+  fi
 fi
+
+overviewer.py --config /home/minecraft/config.py --genpoi