Revert "fix"

This reverts commit a7c9ca3f2f.
This commit is contained in:
2023-08-27 17:53:19 +02:00
parent a9f9747019
commit 73a0bfffe5
9 changed files with 131 additions and 46 deletions

17
telegraf/entrypoint.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
set -e
bashio /settings.sh
if [ "${1:0:1}" = '-' ]; then
set -- telegraf "$@"
fi
if [ $EUID -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 setpriv --reuid root --init-groups "$@"
fi