* [ptxdist] [PATCH v2 7/8] rrdtool: add systemd unit for rrdcached
@ 2017-04-28 12:48 Clemens Gruber
2017-04-28 13:02 ` Michael Olbrich
0 siblings, 1 reply; 3+ messages in thread
From: Clemens Gruber @ 2017-04-28 12:48 UTC (permalink / raw)
To: ptxdist; +Cc: Clemens Gruber
Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---
rules/rrdtool.in | 12 ++++++++++++
rules/rrdtool.make | 8 ++++++++
2 files changed, 20 insertions(+)
diff --git a/rules/rrdtool.in b/rules/rrdtool.in
index fa7e1de1c..fb91a8b84 100644
--- a/rules/rrdtool.in
+++ b/rules/rrdtool.in
@@ -34,6 +34,18 @@ config RRDTOOL_RRDCACHED
accumulates them and, if enough have been received or a defined
time has passed, writes the updates to the RRD file.
+if RRDTOOL_RRDCACHED
+
+config RRDTOOL_RRDCACHED_SYSTEMD_UNIT
+ bool
+ default y
+ depends on SYSTEMD
+ prompt "install rrdcached systemd unit"
+ help
+ Install and enable a systemd socket-activated service
+
+endif
+
config RRDTOOL_RRDCGI
bool
depends on RRDTOOL_RRD_GRAPH
diff --git a/rules/rrdtool.make b/rules/rrdtool.make
index 2c7453811..d43dcac61 100644
--- a/rules/rrdtool.make
+++ b/rules/rrdtool.make
@@ -82,6 +82,14 @@ $(STATEDIR)/rrdtool.targetinstall:
ifdef PTXCONF_RRDTOOL_RRDCACHED
@$(call install_copy, rrdtool, 0, 0, 0755, -, /usr/bin/rrdcached)
+ifdef PTXCONF_RRDTOOL_RRDCACHED_SYSTEMD_UNIT
+ @$(call install_alternative, rrdtool, 0, 0, 0644, \
+ /lib/systemd/system/rrdcached.service)
+ @$(call install_alternative, rrdtool, 0, 0, 0644, \
+ /lib/systemd/system/rrdcached.socket)
+ @$(call install_link, rrdtool, ../rrdcached.socket, \
+ /lib/systemd/system/sockets.target.wants/rrdcached.socket)
+endif
endif
ifdef PTXCONF_RRDTOOL_RRDCGI
@$(call install_copy, rrdtool, 0, 0, 0755, -, /usr/bin/rrdcgi)
--
2.12.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ptxdist] [PATCH v2 7/8] rrdtool: add systemd unit for rrdcached
2017-04-28 12:48 [ptxdist] [PATCH v2 7/8] rrdtool: add systemd unit for rrdcached Clemens Gruber
@ 2017-04-28 13:02 ` Michael Olbrich
2017-04-28 13:18 ` Clemens Gruber
0 siblings, 1 reply; 3+ messages in thread
From: Michael Olbrich @ 2017-04-28 13:02 UTC (permalink / raw)
To: ptxdist
On Fri, Apr 28, 2017 at 02:48:50PM +0200, Clemens Gruber wrote:
> Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
This needs --with-systemdsystemunitdir=/usr/lib/systemd/system
> ---
> rules/rrdtool.in | 12 ++++++++++++
> rules/rrdtool.make | 8 ++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/rules/rrdtool.in b/rules/rrdtool.in
> index fa7e1de1c..fb91a8b84 100644
> --- a/rules/rrdtool.in
> +++ b/rules/rrdtool.in
> @@ -34,6 +34,18 @@ config RRDTOOL_RRDCACHED
> accumulates them and, if enough have been received or a defined
> time has passed, writes the updates to the RRD file.
>
> +if RRDTOOL_RRDCACHED
> +
> +config RRDTOOL_RRDCACHED_SYSTEMD_UNIT
> + bool
> + default y
> + depends on SYSTEMD
> + prompt "install rrdcached systemd unit"
> + help
> + Install and enable a systemd socket-activated service
> +
> +endif
> +
> config RRDTOOL_RRDCGI
> bool
> depends on RRDTOOL_RRD_GRAPH
> diff --git a/rules/rrdtool.make b/rules/rrdtool.make
> index 2c7453811..d43dcac61 100644
> --- a/rules/rrdtool.make
> +++ b/rules/rrdtool.make
> @@ -82,6 +82,14 @@ $(STATEDIR)/rrdtool.targetinstall:
>
> ifdef PTXCONF_RRDTOOL_RRDCACHED
> @$(call install_copy, rrdtool, 0, 0, 0755, -, /usr/bin/rrdcached)
> +ifdef PTXCONF_RRDTOOL_RRDCACHED_SYSTEMD_UNIT
> + @$(call install_alternative, rrdtool, 0, 0, 0644, \
> + /lib/systemd/system/rrdcached.service)
> + @$(call install_alternative, rrdtool, 0, 0, 0644, \
> + /lib/systemd/system/rrdcached.socket)
> + @$(call install_link, rrdtool, ../rrdcached.socket, \
> + /lib/systemd/system/sockets.target.wants/rrdcached.socket)
It's /usr/lib/systemd/system now in master.
Michael
> +endif
> endif
> ifdef PTXCONF_RRDTOOL_RRDCGI
> @$(call install_copy, rrdtool, 0, 0, 0755, -, /usr/bin/rrdcgi)
> --
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ptxdist] [PATCH v2 7/8] rrdtool: add systemd unit for rrdcached
2017-04-28 13:02 ` Michael Olbrich
@ 2017-04-28 13:18 ` Clemens Gruber
0 siblings, 0 replies; 3+ messages in thread
From: Clemens Gruber @ 2017-04-28 13:18 UTC (permalink / raw)
To: ptxdist
On Fri, Apr 28, 2017 at 03:02:12PM +0200, Michael Olbrich wrote:
> On Fri, Apr 28, 2017 at 02:48:50PM +0200, Clemens Gruber wrote:
> > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
>
> This needs --with-systemdsystemunitdir=/usr/lib/systemd/system
Ah, because of the usr split, right.
>
> > ---
> > rules/rrdtool.in | 12 ++++++++++++
> > rules/rrdtool.make | 8 ++++++++
> > 2 files changed, 20 insertions(+)
> >
> > diff --git a/rules/rrdtool.in b/rules/rrdtool.in
> > index fa7e1de1c..fb91a8b84 100644
> > --- a/rules/rrdtool.in
> > +++ b/rules/rrdtool.in
> > @@ -34,6 +34,18 @@ config RRDTOOL_RRDCACHED
> > accumulates them and, if enough have been received or a defined
> > time has passed, writes the updates to the RRD file.
> >
> > +if RRDTOOL_RRDCACHED
> > +
> > +config RRDTOOL_RRDCACHED_SYSTEMD_UNIT
> > + bool
> > + default y
> > + depends on SYSTEMD
> > + prompt "install rrdcached systemd unit"
> > + help
> > + Install and enable a systemd socket-activated service
> > +
> > +endif
> > +
> > config RRDTOOL_RRDCGI
> > bool
> > depends on RRDTOOL_RRD_GRAPH
> > diff --git a/rules/rrdtool.make b/rules/rrdtool.make
> > index 2c7453811..d43dcac61 100644
> > --- a/rules/rrdtool.make
> > +++ b/rules/rrdtool.make
> > @@ -82,6 +82,14 @@ $(STATEDIR)/rrdtool.targetinstall:
> >
> > ifdef PTXCONF_RRDTOOL_RRDCACHED
> > @$(call install_copy, rrdtool, 0, 0, 0755, -, /usr/bin/rrdcached)
> > +ifdef PTXCONF_RRDTOOL_RRDCACHED_SYSTEMD_UNIT
> > + @$(call install_alternative, rrdtool, 0, 0, 0644, \
> > + /lib/systemd/system/rrdcached.service)
> > + @$(call install_alternative, rrdtool, 0, 0, 0644, \
> > + /lib/systemd/system/rrdcached.socket)
> > + @$(call install_link, rrdtool, ../rrdcached.socket, \
> > + /lib/systemd/system/sockets.target.wants/rrdcached.socket)
>
> It's /usr/lib/systemd/system now in master.
>
> Michael
>
> > +endif
> > endif
> > ifdef PTXCONF_RRDTOOL_RRDCGI
> > @$(call install_copy, rrdtool, 0, 0, 0755, -, /usr/bin/rrdcgi)
> > --
> > 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
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-28 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-28 12:48 [ptxdist] [PATCH v2 7/8] rrdtool: add systemd unit for rrdcached Clemens Gruber
2017-04-28 13:02 ` Michael Olbrich
2017-04-28 13:18 ` Clemens Gruber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox