fix: use xargs to speed up chown during init

This commit is contained in:
Daniel-Aaron-Bloom 2024-08-16 10:08:04 -07:00 committed by GitHub
parent 9ca15d0f9d
commit 86f7517846
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,7 @@ fi
cp /root/.profile /config/.profile
# fix permissions (ignore contents of /config/workspace)
find /config -path /config/workspace -prune -o -exec chown abc:abc {} +
find /config -path /config/workspace -prune -o -print0 | xargs -0 -n 1000 -P $(nproc) chown abc:abc
chown abc:abc /config/workspace
chmod 700 /config/.ssh
if [ -n "$(ls -A /config/.ssh)" ]; then