This commit is contained in:
2023-08-27 17:33:05 +02:00
parent 798a8932af
commit a7c9ca3f2f
9 changed files with 46 additions and 131 deletions

View File

@@ -1,17 +0,0 @@
#!/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