Commit 028a7485 authored by Eric Cano's avatar Eric Cano
Browse files

Added conditional restart of daemons in post section of spec file

parent 840521da
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
# Utility for reloading systemctl when needed # Utility for reloading systemctl when needed
#-------------------------------------------- #--------------------------------------------
%define systemdDaemonReload() if [ -e /usr/bin/systemctl ] ; then /usr/bin/systemctl daemon-reload; fi %define systemdDaemonReload() if [ -e /usr/bin/systemctl ] ; then /usr/bin/systemctl daemon-reload; fi
%define systemdTryRestart() if [ -e /usr/bin/systemctl ] ; then /usr/bin/systemctl try-restart %1; fi
# General settings # General settings
#----------------- #-----------------
...@@ -127,6 +128,7 @@ The tape server daemon ...@@ -127,6 +128,7 @@ The tape server daemon
%post -n cta-taped %post -n cta-taped
%systemd_post cta-taped.service %systemd_post cta-taped.service
%systemdDaemonReload %systemdDaemonReload
%systemdTryRestart cta-taped.service
%preun -n cta-taped %preun -n cta-taped
%systemd_preun cta-taped.service %systemd_preun cta-taped.service
...@@ -157,6 +159,7 @@ The xroot plugin ...@@ -157,6 +159,7 @@ The xroot plugin
/sbin/ldconfig /sbin/ldconfig
%systemd_post cta-frontend.service %systemd_post cta-frontend.service
%systemdDaemonReload %systemdDaemonReload
%systemdTryRestart cta-frontend.service
%preun -n cta-frontend %preun -n cta-frontend
%systemd_preun cta-frontend.service %systemd_preun cta-frontend.service
...@@ -339,6 +342,7 @@ The Remote Media Changer daemon (rmcd) ...@@ -339,6 +342,7 @@ The Remote Media Changer daemon (rmcd)
%post -n cta-rmcd %post -n cta-rmcd
%systemd_post cta-rmcd.service %systemd_post cta-rmcd.service
%systemdDaemonReload %systemdDaemonReload
%systemdTryRestart cta-rmcd.service
%preun -n cta-rmcd %preun -n cta-rmcd
%systemd_preun cta-rmcd.service %systemd_preun cta-rmcd.service
...@@ -404,8 +408,11 @@ collects EOS disk copies that have been safely stored to tape. ...@@ -404,8 +408,11 @@ collects EOS disk copies that have been safely stored to tape.
%post -n cta-fst-gcd %post -n cta-fst-gcd
%systemd_post cta-fst-gcd.service %systemd_post cta-fst-gcd.service
%systemdDaemonReload %systemdDaemonReload
%systemdTryRestart cta-fst-gcd.service
%preun -n cta-fst-gcd %preun -n cta-fst-gcd
%systemd_preun cta-fst-gcd.service %systemd_preun cta-fst-gcd.service
%postun -n cta-fst-gcd %postun -n cta-fst-gcd
%systemd_postun cta-fst-gcd.service %systemd_postun cta-fst-gcd.service
%systemdDaemonReload %systemdDaemonReload
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment