pterodactyl / images

Generic docker images designed to work with Pterodactyl Panel and its daemon.
https://pterodactyl.io
MIT License
49 stars 182 forks source link

Update Java 11 to Allow Bash Expressions #71

Closed kakduman closed 3 years ago

kakduman commented 3 years ago

This PR places single quotes around an instance of ${STARTUP}, allowing for bash expressions in the startup command. I made the PR because I tried to set my startup command to

if [[ {{ALLOCATED_MEMORY}} -le {{SERVER_MEMORY}} ]]; then java -Xms{{ALLOCATED_MEMORY}}M -Xmx{{ALLOCATED_MEMORY}}M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -Duser.timezone={{SERVER_TIMEZONE}} -jar {{SERVER_JARFILE}}; fi but it kept giving me a syntax error. It works fine under the new code without breaking anything.

Here's both entrypoint.sh files next to each other. The one with single quotes around ${STARTUP} works whereas the other does not. image

kakduman commented 3 years ago

Wait I think there's a bug