Skip to content

Commit

Permalink
Fix root user check on alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
reimda committed Nov 3, 2021
1 parent 19c33c9 commit 71683dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion telegraf/1.18/alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ "${1:0:1}" = '-' ]; then
set -- telegraf "$@"
fi

if [ $EUID -ne 0 ]; then
if [ "$(id -u)" -ne 0 ]; then
exec "$@"
else
exec su-exec telegraf "$@"
Expand Down
2 changes: 1 addition & 1 deletion telegraf/1.19/alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ "${1:0:1}" = '-' ]; then
set -- telegraf "$@"
fi

if [ $EUID -ne 0 ]; then
if [ "$(id -u)" -ne 0 ]; then
exec "$@"
else
exec su-exec telegraf "$@"
Expand Down
2 changes: 1 addition & 1 deletion telegraf/1.20/alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ "${1:0:1}" = '-' ]; then
set -- telegraf "$@"
fi

if [ $EUID -ne 0 ]; then
if [ "$(id -u)" -ne 0 ]; then
exec "$@"
else
exec su-exec telegraf "$@"
Expand Down

0 comments on commit 71683dc

Please sign in to comment.