diff --git a/entrypoint.sh b/entrypoint.sh index 0206d67..11ac400 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -25,7 +25,8 @@ function kill_server() { if [ -z "${CHILDPID}" ]; then internal_error "\$CHILDPID is unset" fi - kill -SIGINT "${CHILDPID}" + export "SHUTDOWN=true" + kill -INT "${CHILDPID}" } # Print the MCSD banner @@ -189,6 +190,10 @@ function main() { # Run server once run # Restart server if enabled + if [ "${SHUTDOWN}" == "true" ]; then + echo ":: Ending execution" + exit 0 + fi case "${MCSD_AUTO_RESTART}" in "true") echo ":: Restarting server"