From ad24eed9236535daa2a2d575d83d3b322b089a51 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Thu, 28 Nov 2019 12:21:24 +0100 Subject: [PATCH] server/minecraft: systemd waits until server exited --- roles/server/minecraft/templates/minecraft.service | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/server/minecraft/templates/minecraft.service b/roles/server/minecraft/templates/minecraft.service index f29fd7d..4f4560d 100644 --- a/roles/server/minecraft/templates/minecraft.service +++ b/roles/server/minecraft/templates/minecraft.service @@ -21,3 +21,4 @@ ReadWriteDirectories={{ data_directory }} WorkingDirectory={{ data_directory }} ExecStart=/usr/lib/jvm/java-{{ java_version }}-openjdk-amd64/bin/java -Xms{{ minecraft_start_ram | quote }} -Xmx{{ minecraft_max_ram | quote }} -jar {{ installation_directory | quote }}/server.jar nogui ExecStop={{ remote_control_script }} stop +ExecStop=/bin/bash -c "while ps -p $MAINPID > /dev/null; do /bin/sleep 1; done"