Skip to content
Snippets Groups Projects
Commit ed889a4a authored by TheBroTMv2's avatar TheBroTMv2
Browse files

Update papermc.sh

added wait for last launched background process to give the server time to shutdown
parent d22b0405
No related branches found
No related tags found
1 merge request!1Master
......@@ -39,6 +39,7 @@ fi
exec_stop () {
echo "\n## Recieved SIGINT/SIGTERM; Shutting down container..."
screen -r mc -X "stop"
wait $!
exit 0
}
......@@ -49,7 +50,7 @@ while true
then
cat /papermc/logs/latest.log
trap exec_stop TERM INT
sleep 20
sleep 10
else
screen -dmS mc java -server -Xms${MC_RAM} -Xmx${MC_RAM} ${JAVA_OPTS} -jar ${JAR_NAME} nogui
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment