[dircproxy] Add systemd macros for presets. Fixes bug #850091
Kevin Fenzi
kevin at fedoraproject.org
Sat Aug 25 18:49:48 UTC 2012
commit 96e05524ab68b8058585401f96e9c2bf8927cf3a
Author: Kevin Fenzi <kevin at scrye.com>
Date: Sat Aug 25 12:49:45 2012 -0600
Add systemd macros for presets. Fixes bug #850091
dircproxy.spec | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/dircproxy.spec b/dircproxy.spec
index 28dc988..b55a449 100644
--- a/dircproxy.spec
+++ b/dircproxy.spec
@@ -1,7 +1,7 @@
Name: dircproxy
Version: 1.2.0
%define betaver RC1
-Release: 0.15.%{betaver}%{?dist}
+Release: 0.16.%{betaver}%{?dist}
Summary: IRC proxy server
Group: Applications/Internet
@@ -60,28 +60,37 @@ rm -rf $RPM_BUILD_ROOT
-s /bin/sh -r -d %{_localstatedir}/lib/%{name} dircproxy 2> /dev/null || :
%post
-/sbin/chkconfig --add dircproxy
+%if 0%{?fedora} > 17
+ %systemd_post dircproxy.service
+%else
if [ $1 -eq 1 ]; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
+%endif
%preun
+%if 0%{?fedora} > 17
+ %systemd_preun dircproxy.service
+%else
if [ "$1" = 0 ]; then
# Package removal, not upgrade
- /sbin/service dircproxy stop >/dev/null 2>&1 || :
- /sbin/chkconfig --del dircproxy
/bin/systemctl --no-reload disable dircproxy.service > /dev/null 2>&1 || :
/bin/systemctl stop dircproxy.service > /dev/null 2>&1 || :
fi
+%endif
%postun
+%if 0%{?fedora} > 17
+ %systemd_postun_with_restart dircproxy.service
+%else
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart dircproxy.service >/dev/null 2>&1 || :
/sbin/service dircproxy condrestart >/dev/null 2>&1 || :
fi
+%endif
%files
%defattr(-,root,root,-)
@@ -97,6 +106,9 @@ fi
%{_unitdir}/%{name}.service
%changelog
+* Sat Aug 25 2012 Kevin Fenzi <kevin at scrye.com> 1.2.0-0.16.RC1
+- Add systemd macros for presets. Fixes bug #850091
+
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.0-0.15.RC1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list