After installing new systemd service files, we need to force systemd to
reload its configuration to get the new services.
Signed-off-by: Zane Bitter <zbitter(a)redhat.com>
---
matahari.spec.in | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/matahari.spec.in b/matahari.spec.in
index 242d87f..6e89967 100644
--- a/matahari.spec.in
+++ b/matahari.spec.in
@@ -214,6 +214,9 @@ rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-broker
#== Host
%post host
+%if %{defined _unitdir}
+systemctl --system daemon-reload
+%endif
/sbin/service matahari-host condrestart
%preun host
@@ -232,6 +235,9 @@ fi
#== Network
%post network
+%if %{defined _unitdir}
+systemctl --system daemon-reload
+%endif
/sbin/service matahari-network condrestart
%preun network
@@ -250,6 +256,9 @@ fi
#== Services
%post service
+%if %{defined _unitdir}
+systemctl --system daemon-reload
+%endif
/sbin/service matahari-service condrestart
%preun service
@@ -268,6 +277,9 @@ fi
#== sysconfig
%post sysconfig
+%if %{defined _unitdir}
+systemctl --system daemon-reload
+%endif
/sbin/service matahari-sysconfig condrestart
%preun sysconfig
@@ -286,6 +298,9 @@ fi
#== Broker
%post broker
+%if %{defined _unitdir}
+systemctl --system daemon-reload
+%endif
/sbin/service matahari-broker condrestart
%preun broker
Show replies by date