[squid/f18: 3/3] Introduced new systemd-rpm macros in squid spec file. (#850326)

Tomas Hozza thozza at fedoraproject.org
Fri Oct 5 12:19:18 UTC 2012


commit 8a876576565c83a78e0786efa5bcb8b9cf6ebf1a
Author: Tomas Hozza <thozza at redhat.com>
Date:   Fri Oct 5 14:09:57 2012 +0200

    Introduced new systemd-rpm macros in squid spec file. (#850326)

 squid.spec |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/squid.spec b/squid.spec
index e7523c6..329f17e 100644
--- a/squid.spec
+++ b/squid.spec
@@ -4,7 +4,7 @@
 
 Name:     squid
 Version:  3.2.1
-Release:  1%{?dist}
+Release:  2%{?dist}
 Summary:  The Squid proxy caching server
 Epoch:    7
 # See CREDITS for breakdown of non GPLv2+ code
@@ -282,19 +282,13 @@ done
 exit 0
 
 %post
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+%systemd_post squid.service
 
 %preun
-if [ $1 = 0 ] ; then
-        /bin/systemctl disable squid.service > /dev/null 2>&1 || :
-        /bin/systemctl stop squid.service > /dev/null 2>&1 || :
-fi
+%systemd_preun squid.service
 
 %postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ "$1" -ge "1" ] ; then
-        /bin/systemctl try-restart squid.service > /dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart squid.service
 
 %triggerin -- samba-common
 if ! getent group wbpriv >/dev/null 2>&1 ; then
@@ -311,6 +305,9 @@ fi
         /sbin/chkconfig --add squid >/dev/null 2>&1 || :
 
 %changelog
+* Fri Oct 05 2012 Tomas Hozza <thozza at redhat.com> - 7:3.2.1-2
+- Introduced new systemd-rpm macros in squid spec file. (#850326)
+
 * Wed Aug 29 2012 Michal Luscon <mluscon at redhat.com> - 7:3.2.1-1
 - Update to latest upstream 3.2.1
 


More information about the scm-commits mailing list