mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-14 14:22:27 +00:00
d14d666e24
For #102
19 lines
393 B
Bash
Executable file
19 lines
393 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
usermod --uid $UID minecraft
|
|
groupmod --gid $GID minecraft
|
|
|
|
chown -R minecraft:minecraft /data /start-minecraft /home/minecraft
|
|
chmod -R g+wX /data /start-minecraft
|
|
|
|
while lsof -- /start-minecraft; do
|
|
echo -n "."
|
|
sleep 1
|
|
done
|
|
|
|
mkdir -p /home/minecraft
|
|
chown minecraft: /home/minecraft
|
|
|
|
echo "Switching to user 'minecraft'"
|
|
exec sudo -E -u minecraft /start-minecraft "$@"
|