[inn] User systemd scriptlets rpm macros for timers
Jochen Schmitt
s4504kr at fedoraproject.org
Mon Jan 6 16:01:54 UTC 2014
commit ba21ce6965cf9d87703adda69f39cf9b0a865d56
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date: Mon Jan 6 17:01:53 2014 +0100
User systemd scriptlets rpm macros for timers
inn.spec | 36 +++++++++++++-----------------------
1 files changed, 13 insertions(+), 23 deletions(-)
---
diff --git a/inn.spec b/inn.spec
index b0ab867..0c0f1a5 100644
--- a/inn.spec
+++ b/inn.spec
@@ -3,7 +3,7 @@
Summary: The InterNetNews system, an Usenet news server
Name: inn
Version: 2.5.3
-Release: 17%{?dist}
+Release: 18%{?dist}
#see LICENSE file for details
License: GPLv2+ and BSD and MIT and Public Domain
Group: System Environment/Daemons
@@ -236,9 +236,9 @@ chown -R news:news /var/log/news*
%systemd_post innd.service
-systemctl enable innd-expire.timer >/dev/null
-systemctl enable innd-nntpsend.timer >/dev/null
-systemctl enable innd-rnews.timer >/dev/null
+%systemd_post innd-expire.timer
+%systemd_post innd-nntpsend.timer
+%systemd_post innd-rnews.timer
systemctl start innd-expire.timer
systemctl start innd-nntpsend.timer
@@ -295,12 +295,12 @@ if [ -f /etc/syslog.conf ]; then
fi
%preun
+%systemd_preun innd.service
+
%systemd_preun innd-expire.timer
%systemd_preun innd-nntpsend.timer
%systemd_preun innd-rnews.timer
-%systemd_preun innd.service
-
if [ $1 = 0 ]; then
if [ -f /var/lib/news/history.dir ]; then
rm -f /var/lib/news/history.*
@@ -308,25 +308,12 @@ if [ $1 = 0 ]; then
fi
%postun
-systemctl stop innd-expire.timer
-systemctl stop innd-nntpsend.timer
-systemctl stop innd-rnews.timer
-
-systemctl disable innd-expire.timer
-systemctl disable innd-nntpsend.timer
-systemctl disable innd-rnews.timer
-
-# Stop/disable misconfigured timer/service untis
-systemctl stop innd-expire.service
-systemctl stop innd-nntpsend.service
-systemctl stop innd-rnews.service
-
-systemctl disable innd-expire.service
-systemctl disable innd-nntpsend.service
-systemctl disable innd-rnews.service
-
%systemd_postun_with_restart innd.service
+%systemd_postun_with_restart innd-expire.timer
+%systemd_postun_with_restart innd-nntpsend.timer
+%systemd_postun_with_restart innd-rnews.timer
+
%postun libs -p /sbin/ldconfig
%files
@@ -571,6 +558,9 @@ systemctl disable innd-rnews.service
%{_mandir}/man1/inews*
%changelog
+* Sat Jan 4 2014 Jochen Schmitt <Jochen herr-schmitt de> - 2.5.3-18
+- User systemd scriptlets rpm macros for timers
+
* Thu Jan 2 2014 Jochen Schmitt <Jochen herr-schmitt de> - 2.5.3-17
- Add a delay for the systemd timers on boot
- Avoid warning when stopping timers during update
More information about the scm-commits
mailing list