mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
fix(minecraft-server): filter env replacement file
Environment variable replacement now only affects matching file types. Closes #299
This commit is contained in:
parent
73046d7499
commit
a316bd8f95
0
elasticsearch/Dockerfile
Executable file → Normal file
0
elasticsearch/Dockerfile
Executable file → Normal file
0
elasticsearch/README.md
Executable file → Normal file
0
elasticsearch/README.md
Executable file → Normal file
0
elasticsearch/start
Executable file → Normal file
0
elasticsearch/start
Executable file → Normal file
0
gitblit/start.sh
Executable file → Normal file
0
gitblit/start.sh
Executable file → Normal file
0
jekyll-github-pages/start.sh
Executable file → Normal file
0
jekyll-github-pages/start.sh
Executable file → Normal file
0
jenkins/download-and-start.sh
Executable file → Normal file
0
jenkins/download-and-start.sh
Executable file → Normal file
0
kibana/Dockerfile
Executable file → Normal file
0
kibana/Dockerfile
Executable file → Normal file
0
kibana/start.sh
Executable file → Normal file
0
kibana/start.sh
Executable file → Normal file
0
logstash/Dockerfile
Executable file → Normal file
0
logstash/Dockerfile
Executable file → Normal file
0
minecraft-server/start
Executable file → Normal file
0
minecraft-server/start
Executable file → Normal file
0
minecraft-server/start-configuration
Executable file → Normal file
0
minecraft-server/start-configuration
Executable file → Normal file
0
minecraft-server/start-deployBukkitSpigot
Executable file → Normal file
0
minecraft-server/start-deployBukkitSpigot
Executable file → Normal file
0
minecraft-server/start-deployFTB
Executable file → Normal file
0
minecraft-server/start-deployFTB
Executable file → Normal file
0
minecraft-server/start-deployForge
Executable file → Normal file
0
minecraft-server/start-deployForge
Executable file → Normal file
0
minecraft-server/start-deployPaper
Executable file → Normal file
0
minecraft-server/start-deployPaper
Executable file → Normal file
0
minecraft-server/start-deploySpongeVanilla
Executable file → Normal file
0
minecraft-server/start-deploySpongeVanilla
Executable file → Normal file
0
minecraft-server/start-deployVanilla
Executable file → Normal file
0
minecraft-server/start-deployVanilla
Executable file → Normal file
0
minecraft-server/start-finalSetup01World
Executable file → Normal file
0
minecraft-server/start-finalSetup01World
Executable file → Normal file
0
minecraft-server/start-finalSetup02Modpack
Executable file → Normal file
0
minecraft-server/start-finalSetup02Modpack
Executable file → Normal file
0
minecraft-server/start-finalSetup03Modconfig
Executable file → Normal file
0
minecraft-server/start-finalSetup03Modconfig
Executable file → Normal file
0
minecraft-server/start-finalSetup04ServerProperties
Executable file → Normal file
0
minecraft-server/start-finalSetup04ServerProperties
Executable file → Normal file
@ -6,8 +6,8 @@ if [ "$REPLACE_ENV_VARIABLES" = "TRUE" ]; then
|
||||
# check if name of env variable matches the prefix
|
||||
# sanity check environment variables to avoid code injections
|
||||
if [[ "$name" = $ENV_VARIABLE_PREFIX* ]] && [[ $value =~ ^[0-9a-zA-Z_:/=?.+\-]*$ ]] && [[ $name =~ ^[0-9a-zA-Z_\-]*$ ]]; then
|
||||
echo "$name = $value"
|
||||
find /data/ -type f -exec sed -i 's#${'"$name"'}#'"$value"'#g' {} \;
|
||||
echo "Replacing $name with $value ..."
|
||||
find /data/ -type f \( -name "*.yml" -or -name "*.yaml" -or -name "*.txt" -or -name "*.cfg" -or -name "*.properties" \) -exec sed -i 's#${'"$name"'}#'"$value"'#g' {} \;
|
||||
fi
|
||||
done < <(env)
|
||||
fi
|
||||
|
0
minecraft-server/start-minecraftFinalSetup
Executable file → Normal file
0
minecraft-server/start-minecraftFinalSetup
Executable file → Normal file
0
titan-gremlin/Dockerfile
Executable file → Normal file
0
titan-gremlin/Dockerfile
Executable file → Normal file
0
titan-gremlin/start-gremlin.sh
Executable file → Normal file
0
titan-gremlin/start-gremlin.sh
Executable file → Normal file
0
titandb/gremlin
Executable file → Normal file
0
titandb/gremlin
Executable file → Normal file
0
titandb/rexster
Executable file → Normal file
0
titandb/rexster
Executable file → Normal file
0
ubuntu-openjdk-7/Dockerfile
Executable file → Normal file
0
ubuntu-openjdk-7/Dockerfile
Executable file → Normal file
Loading…
Reference in New Issue
Block a user