mirror of
https://github.com/hanzoai/s3.git
synced 2026-11-03 03:07:41 +00:00
Complete rename of all environment variable references from MINIO_ prefix to S3_ prefix across the entire codebase: - internal/config/constants.go: EnvPrefix and all Env* constants - All Go source files: string literals, error messages, comments - Prometheus metrics: minio_* → s3_* metric name prefix - Dockerfiles: ENV declarations - Build scripts, CI workflows, helm charts, docs - Grafana dashboards: metric queries updated Go import paths and package names unchanged. Build verified: go build ./cmd/... passes clean.
27 lines
642 B
Bash
Executable File
27 lines
642 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
|
|
# If command starts with an option, prepend minio.
|
|
if [ "${1}" != "minio" ]; then
|
|
if [ -n "${1}" ]; then
|
|
set -- minio "$@"
|
|
fi
|
|
fi
|
|
|
|
docker_switch_user() {
|
|
if [ -n "${S3_USERNAME}" ] && [ -n "${S3_GROUPNAME}" ]; then
|
|
if [ -n "${S3_UID}" ] && [ -n "${S3_GID}" ]; then
|
|
chroot --userspec=${S3_UID}:${S3_GID} / "$@"
|
|
else
|
|
echo "${S3_USERNAME}:x:1000:1000:${S3_USERNAME}:/:/sbin/nologin" >>/etc/passwd
|
|
echo "${S3_GROUPNAME}:x:1000" >>/etc/group
|
|
chroot --userspec=${S3_USERNAME}:${S3_GROUPNAME} / "$@"
|
|
fi
|
|
else
|
|
exec "$@"
|
|
fi
|
|
}
|
|
|
|
## DEPRECATED and unsupported - switch to user if applicable.
|
|
docker_switch_user "$@"
|