[ircd-ratbox] use systemd macros (#850170)

Nils Philippsen nphilipp at fedoraproject.org
Fri Feb 21 16:26:33 UTC 2014


commit e1cd19544026b1a07d96c7227f33cca60f7d9f9c
Author: Nils Philippsen <nils at redhat.com>
Date:   Fri Feb 21 16:51:41 2014 +0100

    use systemd macros (#850170)

 ircd-ratbox.spec |   20 ++++----------------
 1 files changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/ircd-ratbox.spec b/ircd-ratbox.spec
index bedc5c1..e404800 100644
--- a/ircd-ratbox.spec
+++ b/ircd-ratbox.spec
@@ -93,26 +93,13 @@ useradd -r -g ircd -d %{_var}/run/ircd-ratbox -s /sbin/nologin \
     -c "ircd-ratbox user" ircd
 
 %post
-if [ $1 -eq 1 ] ; then
-    # Initial installation
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
-
+%systemd_post ircd.service
 
 %preun
-if [ $1 -eq 0 ] ; then
-    # Package removal, not upgrade
-    /bin/systemctl --no-reload disable ircd.service > /dev/null 2>&1 || :
-    /bin/systemctl stop ircd.service > /dev/null 2>&1 || :
-fi
-
+%systemd_preun ircd.service
 
 %postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-    # Package upgrade, not uninstall
-    /bin/systemctl try-restart ircd.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart ircd.service
 
 
 %triggerun -- ircd-ratbox < 2.2.8-9
@@ -158,6 +145,7 @@ fi
 - use working upstream and source URLs
 - tidy up inconsistent and trailing whitespace
 - add tmpfile.d configuration and adapt systemd service file (#1030161)
+- use systemd macros (#850170)
 
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2.8-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild


More information about the scm-commits mailing list