[python-carbon] Add systemd service files for aggregator and relay

Jamie Nguyen jamielinux at fedoraproject.org
Wed Oct 8 14:36:07 UTC 2014


commit 7ee660c44e0da85f008f3d4b712a92d2aabe3037
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Wed Oct 8 15:35:36 2014 +0100

    Add systemd service files for aggregator and relay

 python-carbon.spec |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/python-carbon.spec b/python-carbon.spec
index b05208b..2ed489c 100644
--- a/python-carbon.spec
+++ b/python-carbon.spec
@@ -29,7 +29,9 @@ Source13:       carbon-relay.1
 Source14:       validate-storage-schemas.1
 Source20:       %{name}.logrotate
 
-Source30:       carbon-cache.service
+Source30:       carbon-aggregator.service
+Source31:       carbon-cache.service
+Source32:       carbon-relay.service
 
 Source40:       %{name}-cache.init
 Source41:       %{name}-relay.init
@@ -124,7 +126,11 @@ install -D -p -m0644 %{SOURCE20} \
 # init scripts
 %if %{with_systemd}
 install -D -p -m0644 %{SOURCE30} \
+    %{buildroot}%{_unitdir}/carbon-aggregator.service
+install -D -p -m0644 %{SOURCE31} \
     %{buildroot}%{_unitdir}/carbon-cache.service
+install -D -p -m0644 %{SOURCE32} \
+    %{buildroot}%{_unitdir}/carbon-relay.service
 %else
 mkdir -p %{buildroot}%{_localstatedir}/run/carbon
 install -Dp -m0755 %{SOURCE40} \
@@ -155,7 +161,9 @@ getent passwd carbon >/dev/null || \
 
 %post
 %if %{with_systemd}
+%systemd_post carbon-aggregator.service
 %systemd_post carbon-cache.service
+%systemd_post carbon-relay.service
 %else
 /sbin/chkconfig --add carbon-cache
 /sbin/chkconfig --add carbon-relay
@@ -164,7 +172,9 @@ getent passwd carbon >/dev/null || \
 
 %preun
 %if %{with_systemd}
+%systemd_preun carbon-aggregator.service
 %systemd_preun carbon-cache.service
+%systemd_preun carbon-relay.service
 %else
 if [ $1 -eq 0 ]; then
     /sbin/service carbon-cache stop >/dev/null 2>&1
@@ -178,7 +188,9 @@ fi
 
 %if %{with_systemd}
 %postun
+%systemd_postun_with_restart carbon-aggregator.service
 %systemd_postun_with_restart carbon-cache.service
+%systemd_postun_with_restart carbon-relay.service
 %endif
 
 
@@ -220,7 +232,9 @@ fi
 %endif
 
 %if %{with_systemd}
+%{_unitdir}/carbon-aggregator.service
 %{_unitdir}/carbon-cache.service
+%{_unitdir}/carbon-relay.service
 %else
 %dir %{_localstatedir}/run/carbon
 %{_sysconfdir}/init.d/carbon-*


More information about the scm-commits mailing list