This commit is contained in:
2022-06-18 18:39:23 +02:00
parent 1b815108bd
commit 1a62c17c54
9 changed files with 54 additions and 6051 deletions

15
telegraf/entrypoint.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
set -e
if [ "${1:0:1}" = '-' ]; then
set -- telegraf "$@"
fi
if [ "$(id -u)" -ne 0 ]; then
exec "$@"
else
# Allow telegraf to send ICMP packets and bind to privliged ports
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf || echo "Failed to set additional capabilities on /usr/bin/telegraf"
exec su-exec telegraf "$@"
fi