mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: ptxdist@pengutronix.de
Cc: Clemens Gruber <clemens.gruber@pqgruber.com>
Subject: [ptxdist] [PATCH 2/7] collectd: improve systemd service file
Date: Fri, 21 Apr 2017 22:42:01 +0200	[thread overview]
Message-ID: <20170421204206.31312-2-clemens.gruber@pqgruber.com> (raw)
In-Reply-To: <20170421204206.31312-1-clemens.gruber@pqgruber.com>

collectd supports systemd notify. Also add requirements and increase
RestartSec. This is the Debian service file without docs and default
env file.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---
 projectroot/lib/systemd/system/collectd.service | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/projectroot/lib/systemd/system/collectd.service b/projectroot/lib/systemd/system/collectd.service
index 752245c05..5748a6438 100644
--- a/projectroot/lib/systemd/system/collectd.service
+++ b/projectroot/lib/systemd/system/collectd.service
@@ -1,9 +1,16 @@
 [Unit]
-Description=statistics collection daemon
+Description=Statistics collection and monitoring daemon
+After=local-fs.target network.target
+Requires=local-fs.target network.target
+ConditionPathExists=/etc/collectd/collectd.conf
 
 [Service]
-ExecStart=/usr/sbin/collectd -f
+Type=notify
+NotifyAccess=main
+ExecStartPre=/usr/sbin/collectd -t
+ExecStart=/usr/sbin/collectd
 Restart=always
+RestartSec=10
 
 [Install]
 WantedBy=multi-user.target
-- 
2.12.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2017-04-21 20:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 20:42 [ptxdist] [PATCH 1/7] collectd: add memory, ping and rrdcached plugin Clemens Gruber
2017-04-21 20:42 ` Clemens Gruber [this message]
2017-04-28 12:47   ` [ptxdist] [PATCH 2/7] collectd: improve systemd service file Michael Olbrich
2017-04-21 20:42 ` [ptxdist] [PATCH 3/7] collectd: version bump 5.7.0 -> 5.7.1 Clemens Gruber
2017-04-21 20:42 ` [ptxdist] [PATCH 4/7] ethtool: version bump 4.8 -> 4.10 Clemens Gruber
2017-04-21 20:42 ` [ptxdist] [PATCH 5/7] liboping: version bump 1.6.2 -> 1.9.0 Clemens Gruber
2017-04-21 20:42 ` [ptxdist] [PATCH 6/7] net-snmp: add patch for CVE-2015-5621 Clemens Gruber
2017-04-21 20:42 ` [ptxdist] [PATCH 7/7] rrdtool: add systemd unit for rrdcached Clemens Gruber
2017-04-28 12:39   ` Michael Olbrich
2017-04-28 12:46     ` Clemens Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170421204206.31312-2-clemens.gruber@pqgruber.com \
    --to=clemens.gruber@pqgruber.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox