[milter-regex] Use systemd scriptlet macros for preset support (#850207)
Paul Howarth
pghmcfc at fedoraproject.org
Fri Sep 7 15:34:58 UTC 2012
commit 549e6798d95acf5e30354aaa8f84e5e2aec5407f
Author: Paul Howarth <paul at city-fan.org>
Date: Fri Sep 7 16:34:22 2012 +0100
Use systemd scriptlet macros for preset support (#850207)
milter-regex.spec | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/milter-regex.spec b/milter-regex.spec
index 62eb840..0c13d87 100644
--- a/milter-regex.spec
+++ b/milter-regex.spec
@@ -66,24 +66,13 @@ install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/mail/milter-regex.conf
exit 0
%post
-if [ $1 -eq 1 ]; then
- # Initial installation
- /bin/systemctl daemon-reload &>/dev/null || :
-fi
+%systemd_post milter-regex.service
%preun
-if [ $1 -eq 0 ]; then
- # Package removal, not upgrade
- /bin/systemctl --no-reload disable milter-regex.service &>/dev/null || :
- /bin/systemctl stop milter-regex.service &>/dev/null || :
-fi
+%systemd_preun milter-regex.service
%postun
-/bin/systemctl daemon-reload &>/dev/null || :
-if [ $1 -ge 1 ]; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart milter-regex.service &>/dev/null || :
-fi
+%systemd_postun_with_restart milter-regex.service
%files
%doc LICENSE
@@ -98,6 +87,7 @@ fi
%changelog
* Fri Sep 7 2012 Paul Howarth <paul at city-fan.org> - 1.9-5
- drop SysV-to-systemd migration support from F-18 onwards
+- use systemd scriptlet macros for preset support (#850207)
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.9-4
- rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list