diff --git a/scripts/telegraf.service b/scripts/telegraf.service index 81c9b5408..72a4a338e 100644 --- a/scripts/telegraf.service +++ b/scripts/telegraf.service @@ -6,9 +6,7 @@ After=network.target [Service] EnvironmentFile=-/etc/default/telegraf User=telegraf -Environment='STDOUT=/var/log/telegraf/telegraf.log' -Environment='STDERR=/var/log/telegraf/telegraf.log' -ExecStart=/bin/sh -c "exec /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d ${TELEGRAF_OPTS} >>${STDOUT} 2>>${STDERR}" +ExecStart=/usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d ${TELEGRAF_OPTS} ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure KillMode=control-group