Browse Source
Update docker/entrypoint.sh
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
pull/7451/head
Chris Lu
4 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
docker/entrypoint.sh
|
|
@ -7,8 +7,8 @@ if [ "$(id -u)" = "0" ]; then |
|
|
# Running as root, check and fix permissions if needed |
|
|
# Running as root, check and fix permissions if needed |
|
|
SEAWEED_UID=$(id -u seaweed) |
|
|
SEAWEED_UID=$(id -u seaweed) |
|
|
SEAWEED_GID=$(id -g seaweed) |
|
|
SEAWEED_GID=$(id -g seaweed) |
|
|
DATA_UID=$(stat -c '%u' /data 2>/dev/null || stat -f '%u' /data) |
|
|
|
|
|
DATA_GID=$(stat -c '%g' /data 2>/dev/null || stat -f '%g' /data) |
|
|
|
|
|
|
|
|
DATA_UID=$(stat -c '%u' /data 2>/dev/null) |
|
|
|
|
|
DATA_GID=$(stat -c '%g' /data 2>/dev/null) |
|
|
|
|
|
|
|
|
# Only run chown -R if ownership doesn't match (much faster for subsequent starts) |
|
|
# Only run chown -R if ownership doesn't match (much faster for subsequent starts) |
|
|
if [ "$DATA_UID" != "$SEAWEED_UID" ] || [ "$DATA_GID" != "$SEAWEED_GID" ]; then |
|
|
if [ "$DATA_UID" != "$SEAWEED_UID" ] || [ "$DATA_GID" != "$SEAWEED_GID" ]; then |
|
|
|