We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 688d224 commit 6b021f1Copy full SHA for 6b021f1
telegraf/nightly/alpine/entrypoint.sh
@@ -5,4 +5,8 @@ if [ "${1:0:1}" = '-' ]; then
5
set -- telegraf "$@"
6
fi
7
8
-exec "$@"
+if [ "$(id -u)" -ne 0 ]; then
9
+ exec "$@"
10
+else
11
+ exec su-exec telegraf "$@"
12
+fi
telegraf/nightly/entrypoint.sh
@@ -1,12 +1,12 @@
1
-#!/bin/sh
+#!/bin/bash
2
set -e
3
4
if [ "${1:0:1}" = '-' ]; then
-if [ "$(id -u)" -ne 0 ]; then
+if [ $EUID -ne 0 ]; then
exec "$@"
else
- exec su-exec telegraf "$@"
+ exec setpriv --reuid telegraf --init-groups "$@"
0 commit comments