diff --git a/collectd.yaml b/collectd.yaml index 8ed3177..1c227b5 100644 --- a/collectd.yaml +++ b/collectd.yaml @@ -51,7 +51,31 @@ storage: Port 9103 + - path: /etc/selinux/collectdlocal.cil + mode: 0644 + contents: + inline: | + (typepermissive collectd_t) + + - path: /etc/systemd/system/semodule-collectdlocal.service + mode: 0644 + contents: + inline: | + [Unit] + ConditionPathExists=/etc/selinux/collectdlocal.cil + Before=collectd.service + + [Service] + Type=oneshot + ExecStart=/usr/sbin/semodule -i /etc/selinux/collectdlocal.cil + ExecStartPost=/bin/rm -f /etc/selinux/collectdlocal.cil + + [Install] + WantedBy=multi-user.target + systemd: units: - name: collectd.service enabled: true + - name: semodule-collectdlocal.service + enabled: true