Skip to content

Commit

Permalink
Little speed up on restart by not runing chown again.
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelgbanks committed Apr 22, 2023
1 parent 284566c commit 575b841
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ if [[ "${DEVELOPMENT_ENVIRONMENT}" == "true" ]]; then
if [[ -n "${UID}" ]]; then
if ! getent passwd ${UID}; then
usermod -u ${UID} nginx
fi
if "$(stat -c %u /var/www)" != "${UID}"; then
parallel --will-cite chown -R nginx:nginx ::: \
/opt/code-server \
/root/.composer \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ if [[ "${DEVELOPMENT_ENVIRONMENT}" == "true" ]]; then
if [[ -n "${UID}" ]]; then
if ! getent passwd ${UID}; then
usermod -u ${UID} nginx
fi
if "$(stat -c %u /var/www)" != "${UID}"; then
chown -R nginx:nginx /var/www
fi
fi
Expand Down

0 comments on commit 575b841

Please sign in to comment.