[mc] Putting back usermod solution

This commit is contained in:
Geoff Bourne
2016-02-27 17:10:11 -06:00
parent b15ad9e799
commit 03d9064b35
2 changed files with 18 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
set -e
usermod --uid $UID minecraft
groupmod --gid $GID minecraft
chown -R minecraft:minecraft /data /start-minecraft
chmod -R g+wX /data /start-minecraft
while lsof -- /start-minecraft; do
echo -n "."
sleep 1
done
echo "...switching to user 'minecraft'"
exec sudo -E -u minecraft /start-minecraft