Merge "add telegraf log directory /var/log/kolla/telegraf"
This commit is contained in:
commit
a9c98ba58c
@ -6,8 +6,11 @@ MAINTAINER {{ maintainer }}
|
||||
{{ macros.install_packages(telegraf_packages | customizable("packages")) }}
|
||||
|
||||
COPY telegraf_sudoers /etc/sudoers.d/kolla_telegraf_sudoers
|
||||
COPY extend_start.sh /usr/local/bin/kolla_telegraf_extend_start
|
||||
|
||||
RUN chmod 750 /etc/sudoers.d \
|
||||
&& chmod 440 /etc/sudoers.d/kolla_telegraf_sudoers \
|
||||
&& chmod 755 /usr/local/bin/kolla_telegraf_extend_start \
|
||||
&& usermod -a -G kolla telegraf
|
||||
|
||||
{% block telegraf_footer %}{% endblock %}
|
||||
|
10
docker/telegraf/extend_start.sh
Normal file
10
docker/telegraf/extend_start.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
TELEGRAF_LOG_DIR="/var/log/kolla/telegraf"
|
||||
|
||||
if [[ ! -d "${TELEGRAF_LOG_DIR}" ]]; then
|
||||
mkdir -p ${TELEGRAF_LOG_DIR}
|
||||
fi
|
||||
if [[ $(stat -c %a ${TELEGRAF_LOG_DIR}) != "755" ]]; then
|
||||
chmod 755 ${TELEGRAF_LOG_DIR}
|
||||
fi
|
Loading…
Reference in New Issue
Block a user