This commit is contained in:
2022-06-18 16:29:53 +02:00
parent 85b5188977
commit a6674e0e3e
5 changed files with 61 additions and 8 deletions

52
telegraf/apparmor.txt Normal file
View File

@@ -0,0 +1,52 @@
#include <tunables/global>
profile hassio_telegraf flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
# Capabilities
file,
signal (send) set=(kill,term,int,hup,cont),
# S6-Overlay
/init ix,
/bin/** ix,
/usr/bin/** ix,
/run/{s6,s6-rc*,service}/** ix,
/package/** ix,
/command/** ix,
/etc/services.d/** rwix,
/etc/cont-init.d/** rwix,
/etc/cont-finish.d/** rwix,
/run/{,**} rwk,
/dev/tty rw,
# Bashio
/usr/lib/bashio/** ix,
/tmp/** rwk,
# Access to options.json and other files within your addon
/data/** rw,
# Start new profile for service
/usr/bin/myprogram cx -> myprogram,
profile myprogram flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
# Receive signals from S6-Overlay
signal (receive) peer=*_ADDON_SLUG,
# Access to options.json and other files within your addon
/data/** rw,
# Access to mapped volumes specified in config.json
/share/** rw,
# Access required for service functionality
/usr/bin/myprogram r,
/bin/bash rix,
/bin/echo ix,
/etc/passwd r,
/dev/tty rw,
}
}

View File

@@ -1,8 +1,8 @@
build_from:
aarch64: ghcr.io/hassio-addons/debian-base/aarch64:5.3.1
amd64: ghcr.io/hassio-addons/debian-base/amd64:5.3.1
armhf: ghcr.io/hassio-addons/debian-base/armhf:5.3.1
armv7: ghcr.io/hassio-addons/debian-base/armv7:5.3.1
i386: ghcr.io/hassio-addons/debian-base/i386:5.3.1
aarch64: ghcr.io/hassio-addons/debian-base/aarch64:6.0.0
amd64: ghcr.io/hassio-addons/debian-base/amd64:6.0.0
armhf: ghcr.io/hassio-addons/debian-base/armhf:6.0.0
armv7: ghcr.io/hassio-addons/debian-base/armv7:6.0.0
i386: ghcr.io/hassio-addons/debian-base/i386:6.0.0
args:
TELEGRAF_VERSION: 1.22.4
TELEGRAF_VERSION: 1.23.0

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# ==============================================================================
# Home Assistant Community Add-on: Glances
# Home Assistant Community Add-on:
# This file turns s6-nuke into a NOOP to prevent total termination
# of the host system since the add-on runs in the same PID namespace.
# ==============================================================================

View File

@@ -5,4 +5,5 @@
if -n { s6-test $# -ne 0 }
if -n { s6-test ${1} -eq 256 }
s6-svscanctl -t /var/run/s6/services
#s6-svscanctl -t /var/run/s6/services
/run/s6/basedir/bin/halt

0
telegraf/rootfs/etc/services.d/telegraf/run Executable file → Normal file
View File