Created
May 11, 2018 05:12
-
-
Save daryltucker/e5625729625d52c0306e53fe37cc2d26 to your computer and use it in GitHub Desktop.
Update Minecraft Overviewer Google Maps API Key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Maybe there is an 'official' way... this works with cron so :"D | |
| G_MAPS_KEY="" | |
| WORLD_PATH="/home/minecraft/minecraft-1.12.2/world/" | |
| WWW_PATH="/home/minecraft/minecraft-1.12.2/www-overviewer/" | |
| OLD_MAP_SRC="api/js?sensor=false" | |
| NEW_MAP_SRC="api/js\?key=${G_MAPS_KEY}\&sensor=false" | |
| overviewer.py ${WORLD_PATH} ${WWW_PATH} | |
| sed -i "s#${OLD_MAP_SRC}#${NEW_MAP_SRC}#g" ${WWW_PATH}index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment