mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 2/7] collectd: improve systemd service file
Date: Fri, 28 Apr 2017 14:47:18 +0200	[thread overview]
Message-ID: <20170428124718.ztvos6ciqr5ywqoz@pengutronix.de> (raw)
In-Reply-To: <20170421204206.31312-2-clemens.gruber@pqgruber.com>

On Fri, Apr 21, 2017 at 10:42:01PM +0200, Clemens Gruber wrote:
> 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

local-fs.target is already implicitly set for both and network.target is
not well defined, but I don't mind if it is set.

> +ConditionPathExists=/etc/collectd/collectd.conf

We always install this, so this is not needed.

>  
>  [Service]
> -ExecStart=/usr/sbin/collectd -f
> +Type=notify
> +NotifyAccess=main

This is the default for Type=notify and can be removed.

> +ExecStartPre=/usr/sbin/collectd -t

Not sure if we need this. The config is quite static on a embedded system.

Michael

> +ExecStart=/usr/sbin/collectd
>  Restart=always
> +RestartSec=10
>  
>  [Install]
>  WantedBy=multi-user.target
> -- 
> 2.12.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2017-04-28 12:47 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 ` [ptxdist] [PATCH 2/7] collectd: improve systemd service file Clemens Gruber
2017-04-28 12:47   ` Michael Olbrich [this message]
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=20170428124718.ztvos6ciqr5ywqoz@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --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