Avoid text file busy prior to exec sudo

This commit is contained in:
Geoff Bourne
2015-11-30 20:56:25 -06:00
parent 847f403bd3
commit 764ae807e0
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -4,5 +4,9 @@ set -e
usermod --uid $UID minecraft
chown -R minecraft /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