Merge pull request #1122 from wilmardo/fix-stdout
Fix logging to stdout when using a RUN_AS user
This commit is contained in:
@@ -61,7 +61,7 @@ if [[ "true" = "$DROP_DEFAULT_ROUTE" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "true" = "$DOCKER_LOG" ]]; then
|
if [[ "true" = "$DOCKER_LOG" ]]; then
|
||||||
LOGFILE=/proc/1/fd/1
|
LOGFILE=/dev/stdout
|
||||||
else
|
else
|
||||||
LOGFILE=${TRANSMISSION_HOME}/transmission.log
|
LOGFILE=${TRANSMISSION_HOME}/transmission.log
|
||||||
fi
|
fi
|
||||||
|
@@ -6,8 +6,16 @@ RUN_AS=root
|
|||||||
|
|
||||||
if [ -n "$PUID" ] && [ ! "$(id -u root)" -eq "$PUID" ]; then
|
if [ -n "$PUID" ] && [ ! "$(id -u root)" -eq "$PUID" ]; then
|
||||||
RUN_AS=abc
|
RUN_AS=abc
|
||||||
if [ ! "$(id -u ${RUN_AS})" -eq "$PUID" ]; then usermod -o -u "$PUID" ${RUN_AS} ; fi
|
if [ ! "$(id -u ${RUN_AS})" -eq "$PUID" ]; then
|
||||||
if [ ! "$(id -g ${RUN_AS})" -eq "$PGID" ]; then groupmod -o -g "$PGID" ${RUN_AS} ; fi
|
usermod -o -u "$PUID" ${RUN_AS};
|
||||||
|
fi
|
||||||
|
if [ ! "$(id -g ${RUN_AS})" -eq "$PGID" ]; then
|
||||||
|
groupmod -o -g "$PGID" ${RUN_AS};
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "true" = "$DOCKER_LOG" ]]; then
|
||||||
|
chown ${RUN_AS}:${RUN_AS} /dev/stdout
|
||||||
|
fi
|
||||||
|
|
||||||
# Make sure directories exist before chown and chmod
|
# Make sure directories exist before chown and chmod
|
||||||
mkdir -p /config \
|
mkdir -p /config \
|
||||||
|
Reference in New Issue
Block a user