minecraft-pi-docker/debian/client/virgl/usr/lib/minecraft-pi/run.sh

19 lines
279 B
Bash
Raw Normal View History

2020-10-16 19:39:04 +00:00
#!/bin/sh
set -e
# Start VirGL
virgl_test_server > /tmp/minecraft-pi/virgl.log 2>&1 &
VIRGL_PID=$!
2020-10-16 19:39:04 +00:00
# Launch Minecraft
set +e
2021-01-31 02:32:20 +00:00
docker-compose -f "${DOCKER_COMPOSE_YML}" run --rm minecraft-pi
RET=$?
set -e
2020-10-16 19:39:04 +00:00
# Kill VirGL
2021-02-28 20:35:04 +00:00
kill ${VIRGL_PID} > /dev/null 2>&1 || :
2020-10-16 19:39:04 +00:00
2021-02-28 20:35:04 +00:00
# Exit
exit ${RET}